AnsweredAssumed Answered

adi_rom_boot() call condition

Question asked by chiara.bizzotto on Mar 23, 2017
Latest reply on May 26, 2017 by Jithul_Janardhanan


i'm trying to implement a SSL in my blip2 platform and i've some doubts on when the call to adi_rom_boot actually works.


The main app is quite simple: the led blinks and then it waits for a button to be pressed. If button 1, boot application A that keeps blinking the led, if button 2  boot application B that keeps the led on.

Application A is at offset 20000 and B is at offset 40000.


First i've noticed that I have to clear all the pins i used (led and buttons) and unregister the callback for the button prior to call the boot function. Strangely this doesn't occur all the time: sometimes clearing the pins is necessary and others time is not.


Once it's working, simply increasing the delay between toggles on the led pin before the boot call, leads to everything not working again. Delay function is just a for loop with "nop;" instrunctions.


[..... init of led and buttons ....]

//Led blinking
adi_gpio_Toggle( ADI_GPIO_PORT_A, ADI_GPIO_PIN_9 );

adi_gpio_Toggle( ADI_GPIO_PORT_A, ADI_GPIO_PIN_9 );
Delay(3847000u); // if i increase this delay adi_rom_boot fails

adi_gpio_Toggle( ADI_GPIO_PORT_A, ADI_GPIO_PIN_9 );

//wait for button (cont, address and command are set inside callback function)
while(cont == true);

*pREG_L1IM_ICTL = 0;
adi_rom_Boot((void*)address, 0, 0, 0, command);


Also, if the main app is build with optimization enabled it the call fails.


I'm not sure i'm clear with my problem, but i'm curious if there is a state the program should be in before calling the adi_rom_boot function (beside *pREG_L1IM_ICTL = 0 )


The adi_rom_boot is called with command 0x207.


I've looked into EE374v01 but I couldn't run the example code because it's not for blip2 board.


Hoping to get some help on this!