EMDS bricking device

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?

Parents Reply Children
  • Hi, 

    It seems that partial erase is currently not working as expected for the 9160 (non-secure build). If you remove the CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE from the prj.conf the application works fine. The drawback is that the CPU will be halted during the erase operation. For most use cases this will not be an issue but we will investigate further so that partial erasing will be possible in the future. 

    The issue has been reported to the responsible team. For now, by removing the partial erase option, you should be able to continue with the work.

    -Amanda H. 

Related