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

Flashing alternating applications nRFgo Studio

Two applications using the same softdevice, s110, blinky and beacon from the examples.

Flashing softdevice and beacon successfully. Replacing beacon app by blinky successfully. Trying to replace blinky by beacon:

"Application .. programming failed. The flash is not erased."

To get beacon back on I have to erase and reflash softdevice! May seem like a minor, but why? Makes me think that there is something that I do not understand about the memory structure.

Why can't I freely flash back and forth different applications in the 0x18000 area without going back and reflash softdevice?

Sorry did not know how to do this since I couldn't add images to comment. Yes both Blinky and Beacon start in 0x18000. But they are using a different address type Extended Segment instead of Extended Linear, I am using the armgcc toolchain if that has something to do with it. image description image description

Parents
  • After lots of investigations using the JLinkExe I have reached the following conclusion. Each area in the flash can only be flashed once by the JLink tools, if you want to flash that area again you need to do a full erase of the flash before flashing the area. Maybe this is expected behavior but I have not seen it in any documentation.

  • Ok this is now even further narrowed down. When the flash is erased all ones are written to every position, writing to any of the positions works nicely since this means that some positions will go from 1 to 0. Once a position has gone to 0 it can not be brought back to 1 with another write only by a full erase of the flash. Hardware, firmware issue? Doing the same thing in the RAM section works perfectly!

Reply
  • Ok this is now even further narrowed down. When the flash is erased all ones are written to every position, writing to any of the positions works nicely since this means that some positions will go from 1 to 0. Once a position has gone to 0 it can not be brought back to 1 with another write only by a full erase of the flash. Hardware, firmware issue? Doing the same thing in the RAM section works perfectly!

Children
No Data
Related