AnsweredAssumed Answered

adi_rom_boot  user mode / supervisor mode error

Question asked by alban on Jun 15, 2015
Latest reply on Jun 16, 2015 by CommanderDave

Hello
i need to perform a dual stage boot in SPI2 master mode

i won't be able to use the initcode feature because i must release an encrypted boot stream

here is a simple code for testing the adi_rom_boot function

the program performs the SEC init, the CGU init, the GPIO LED init,
then it blinks ten times before rebooting on itself endlessly via the boot procedure


void main(void)
{
       adi_initComponents();
       bf706_clock_init(); /* PLL clock initialization */
       init_gpio();   /* FOR LEDS */

       uint32_t i = 10;
       while(i){
          LED1_ON;
          bf706_delay_ms(50);
          LED1_OFF;
          bf706_delay_ms(50);
          i--;
       }
       adi_rom_Boot(0,0,0,0,0x20211202);
       __builtin_idle();
       while(1);
}


but when i run this program i get the following message :
"
A fatal error or exception has occurred.
  Description:   Attempted to use a Supervisor register or instruction from User mode (Exception with EXCAUSE=0x2E).
  General Type:  UnhandledException
  Specific Type: SupervisorResource
  General Code:  0x9
  Specific Code: 0x2e
  Error Value:   0x00000000
  Error PC:      0x04003ad2
  "
 
  the question is :
  how to i get rid of this ? to i need to enter in supervisor mode and if yes how do i do ?
 
  thanks a lot for your support

sorry for the awful formatting this online form is really a pain to use.

Alban

Outcomes