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

S120 stack re-writing itself?

Our application uses the S120 stack, and a bootloader. We want the bootloader to be able to update both our application software and the S120 stack (preserving the MBR).

We create a single binary image from the S120 and application hex files, using 'objcopy'. Unfortunately, this fills in gaps with 0x00, where they would normally be left as 0xFF when programming the flash.

When I install the stack (unprotected) and bootloader, then run it, the bootloader correctly installs and runs our application from a serial flash. However, when we cycle power, the checksum doesn't match, and the bootloader installs the application again before running.

On examination, I found a large chunk of 0x00s (at address 0xC00) had been changed to 0xFF!

I've concluded that the stack must be doing this, though I haven't caught it in the act. Does the softdevice ever modify its own section of flash? If so, how can we be sure of the integrity of the softdevice image?

Thanks for your help,

Michael

Related