This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

App won't start after writing to flash (with FDS)

Hello,

I am trying to figure out my problem related to this question.

I am writing just a couple of words to flash with FDS. The problem is that after writing, the device doesn't run anymore when reset. If not reset, it keeps running normally after writing, but as soon as I reset it, it doesn't do anything, it's bricked so to speak. The only way to restore is to erase the chip completely and reflash it.

I dumped the flash of the NRF52832 before and after writing to flash with JLink's savebin command. I diffed both files and I see that only the last 3 pages of the flash have been modified.

It wrote dec0 adde ff01 1ef1 at 0x7D000, dec0 adde fe01 1ef1 at 0x7E000, and dec0 adde fe01 1ef1 at 0x7F000, which are the page tags used by FDS as per the documentation. It also wrote 0010 0200 0010 0000 0100 0000 aaaa aaaa bbbb bbbb at 0x7E008, which looks correct to me as the FDS record, being my data 0xAAAAAAAA and 0xBBBBBBBB.

What I don't understand is why after writing that in those positions in flash, the NRF doesn't run anymore. Any explanations?

I don't have a bootloader flashed at the moment, I'm using SDK 13.1 and softdevice S132 4.0.2 on an NRF52832.

UPDATE: I am wondering whether I may need to make some changes to my linker script? Or maybe I need to define something regarding the app data somewhere? I know that when you're using the bootloader you need to specify the app data memory region using a define, and I know that you can specify the number of virtual pages for FDS in the configuration header file. Otherwise, I haven't made any further changes.

Related