I'd like to erase all the pages managed by FDS as part of a "Hard Reset" operation. fds.c has a hint of a "FRESH_INSTALL" directive (part of an enum defined in fds_internal_defs.h), but I don't see any implementation. Are there plans to provide this, or is there some simple way to clear out fds managed pages that I'm missing?
(I can break out the next section into a separate question, but it is closely related)
I've started to build out the fds FRESH_INSTALL myself. In a modified fds.c I call fs_erase to erase all the pages, reset the gc page, handle the async events, eventually pickup the normal init sequence. I am happy to share my code. It almost works -- My program runs just fine (the s130 softdevice continues to work, all my timers and twi work, I can use fds successfully, everything seems just fine), but when I remove power from my device, it won't start up again. If I do not remove power, but instead attempt to connect the Keil debugger to it, Keil puts the program-counter at the dread 0xFFFFFFFE movs r0,r0 instruction. This suggests to me my stack is corrupt. If that were the case, why would my program continue to run?
Does anyone have experience with erasing fds managed memory? Does anyone recognize the symptom of a correctly running device that fails as described when connecting a debugger?
Thanks!