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

Flash Data Storage

Hi,

In the product I'm working on I need to store some configuration data in persistent memory. I came accross serveral ways to do that. I think the best way to go is to use the Flash Data Storage library because it is easy to use and handles all kinds of error checking, CRC checks etc.

Besides reading and writing records to/from flash, I want to be able to store configuration data at production. In the previous version of the product (when we used anonther microcontroller) we programmed the configuration data at a specific place in the memory. I wonder if this is also possible when the Flash Data Storage library is used. So far I haven't been able to figure out the actual place in flash where the FDS stores the records.

Is there someone who has experience with this?

Thanks in advance,

JR.

  • You can either write directly to flash over SWD during FW programming (so when FW boots for the first time it already has all the data in place). That assumes you know format of the data and their representation in the flash memory (but that should be easy because you can do it in FW and then dump the memory to see how it looks when written to flash). Another way is to use CUSTOM part of UICR region which is basically one time programmable user space with limited size (32*4B) and also I'm not sure if you can restrict read over SWD (debug interface) together with standard read-back protection of entire flash. But again UICR works "like flash", you can address it and write to it during FW programming over JTAG/SWD.

Related