Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Does boot loader reset the power to RAM before jumping to application?

My goal is to have my boot loader write a constant value to RAM and have my applicaton read that same location and retrieve that value.

I am using the stock boot loader available in SDK 16.0.0 under examples/dfu/secure_bootloader/pca10040_s132_ble/ses.
I am modifying the program to write a specific value e.g. 0x12345678 to a 4-byte aligned address located at the top of the RAM -- in my case the address is 0x2000FFF0 on the nRF52832_xxAA.
I am modifying the SES project file and the flash xml file to completely eliminate the top 16 bytes of the RAM from the allowed segment and section ranges.

I can debug my boot loader and it write the correct value to the location.
I then merge this with my application and generate a full package using nrfutil and mergehex tools with the proper signature and encryption etc.
I can also confirm that the application does behave as expected i.e. broadcast advertisements etc.

However, the applicaton always reads all '0' from the RAM location 0x2000FFF0.
I have reviewed the generated disassembly of the boot loader and the application and they appear to do the right thing.

My question is:

  1. DOES THE BOOT LOADER RESET THE POWER TO THE RAM BEFORE JUMPING TO THE APPLICATION?
  2. If yes then HOW CAN I PREVENT OR SIDE STEP THAT OPERATON?

Cheers

RMV

Related