This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Adding noinit section to store data between reboots with nRF Connect SDK

I am re-implementing a custom error handler that stores error data and forms an error report after reboot, after having a success with it in nRF SDK 15.

In nRF SDK I could manually edit the flash placement xml file to add a noinit section and declare a variable with __attribute__((section(".noinit_section_name"))).

In NCS you set static seciton placements in pm_static.yml file, but I can't find anything about noinit sections in NCS documentation. Can it be done?

I've looked into libraries that deal with flash data storage like NVS, but unfortunately they implement protection for write commands from being called from within interrupts.

My boards are nRF9160DK and Thingy:91, so I am looking to implement this with both 52840 and 9160.

  • Hello,

    In NCS you set static seciton placements in pm_static.yml file, but I can't find anything about noinit sections in NCS documentation. Can it be done?

    You are probably right, I don't think there is much information about this in the documentation. I found this macro which seems to do something to that extent, not sure if that's what you are asking for. I see it's being used a few places, like in this test sample.

Related