Hello,
I am using EMDS to store data to flash under certain conditions. The implementation is pretty basic and follows the specification and example in the SDK (v2.1.2). For the most part it works great, but after the 5th time emds_store is called, the device bricks and must be re-flashed to work again. The device is normally reset after every call to emds_store. emds_store is called in an interrupt context (like the examples).
I have verified the write/erase etc .. timings are correct for the part. I have tried using 1 or 2 sectors - always the same behaviour.
One clue (maybe) is that I store about 702 bytes of data. A page size is 4096 - which means I can fit about 5 copies of my data in the flash before an erase needs to happen. Could this be the issue? How do I get around this problem?