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

NRF52840 Fstorage

Hi,

I would like to store 180 000 bytes on the flash with fstorage. By using the example after some trouble it works. When I try to apply this example on my own program, it is limited to 1000 bytes. I think that it is due to a parameter on sdk_config.h ! any idea ?

regards

  • Hi Seb,

    What you are describing here is a general issue when working with different interrupt priorities. If you wait for something in one thread/task/ISR/etc. that should happen in another, that must have a higher interrupt priority. The typical way to solve this is to wait with low priority. So for instance, do your flash writing from your main loop and not a interrupt. That is often the simplest and best approach. You could also try to work with priorities, but in many nRF applications your interrupts will come from the SoftDevice and if you do your work there it will be the same priority as fstorage (which in the end also is the SoftDevice in this case).

    So in a nutshell: try to write to flash and wait from your main loop and not in an interrupt/event handler.

Related