This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Dual boot by reading eeprom memory

Part Number: TM4C123GH6PM

Hi,

I am new to this TI Community, forgive me if my questionnaire is wrong. I am trying to write two app in the flash memory and boot anyone through reading the eeprom data . I have partially done with booting using  

    IntMasterDisable();

HWREG(NVIC_VTABLE) = 0x0001f7e8;
__asm(" ldr r1, [r0]\n"
" mov sp, r1");

__asm(" ldr r0, [r0, #4]\n"
" bx r0\n");

in the above case all my interrupts are disabled.

My question is

1) How can i re-enable my interrupts in my app?

2) How to read eeprom value in my boot loader program? 

Thank you in advance,

Prakash

  • Hi,

    Prakash S57 said:
    1) How can i re-enable my interrupts in my app?

      I'm not clear with your question. Once you branch to the application then your application will need to enable the interrupts for the peripherals you want.

    Prakash S57 said:
    2) How to read eeprom value in my boot loader program? 

      There is an example in the page 128 of the TivaWare Peripheral Driver Library user's guide. Below is a snippet to program and read the Eeprom. 

    //
    // Program some data into the EEPROM at address 0x400.
    //
    pui32Data[0] = 0x12345678;
    pui32Data[1] = 0x56789abc;
    EEPROMProgram(pui32Data, 0x400, sizeof(pui32Data));
    //
    // Read it back.
    //
    EEPROMRead(pui32Read, 0x400, sizeof(pui32Read));

     

  • Hello Charles,
    Thank you for your help sir. In the above code i have disabled the interrupt(IntMasterDisable();) so that my boot loader executes fine, but later when i enable the interrupt(IntMasterEnable();) in my application my system halts.Can u suggest me how to enable it and what mistake i have done.

    Regards,

    Prakash