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.

MCU-PLUS-SDK-AM243X: SRAM contents after MCU reset for the AM243x

Part Number: MCU-PLUS-SDK-AM243X

I have a bootloader (SBL) and an application that is loaded by the SBL from an external SPI NOR flash address. The application writes certain values to the SRAM and issues a SW reset of the MCU. I have a use case where I need the bootloader to read the values written to an SRAM section by the application after a reset. So far I keep reading 0s at the address from the bootloader even after I have defined a separate section at a particular address (same address read out by the bootloader) in the linker file and have defined it as RWX and NOLOAD.

If I use CCS to jtag-load just the application using a debug session, write some value to the said SRAM address and then stop the debug session and restart the jtag-load debug session, I can read the values I wrote earlier in the previous debug session just fine. So seems like the linker setup to make data stick around in SRAM seems to be working; however, I can't do the same when I reset the MCU and try to read the address out from the bootloader that loads post reset.

Does the AM243x reset all SRAM contents to 0 post a SW reset? Is it maybe the ROM bootloader code that is doing this, or simply the HW design, perhaps?

If that's not expected of the reset sequence, how could I possibly have the bootloader read an SRAM address that was written to by an application with a reset in between the application-write and the bootloader-read?

  • Hi ,

    I have defined a separate section at a particular address (same address read out by the bootloader) in the linker file and have defined it as RWX and NOLOAD

    Did you do this for secondary bootloader as well ?

    Does the AM243x reset all SRAM contents to 0 post a SW reset? Is it maybe the ROM bootloader code that is doing this, or simply the HW design, perhaps?

    Note : If the section is part of Secondary Bootloader, ROM Bootloader will load the image as an single blob from the SPI NOR Flash. The NOLOAD sections will be initialized as 0. Keep the sections outside the SBL memory and only in Application NOLOAD sections.

    If you assert a Warm Reset, then Memories are not initialized.

    If that's not expected of the reset sequence, how could I possibly have the bootloader read an SRAM address that was written to by an application with a reset in between the application-write and the bootloader-read?

    Keep the memory only to be part of application linker and application address space. Keep the memory as No Load. I hope the *.bss memory does not get initialized in the _c_init_100 of the application. If it does, then I would suggest you to keep the memory outside the application as well in a separate scratchpad memory which is not referenced in any section inside the linker.

    Best Regards,
    Aakash