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?