noinit region of RAM to store data between reboots

I'm implementing a feature which requires me to store data in ram region which would not be resetted during reboots (sys_reboot(SYS_REBOOT_WARM)). 

I'm using clause in application :

__attribute__((section(".noinit"))) static volatile uint32_t EXPERIMENTAL_counter;
which does not work, as EXPERIMENTAL_counter does not retain value between reboots.
System uses NRF53, Zephyr and MCUboot prior to boot of Appcore. My diagnosis is that MCUboot messes up this .noinit area from appcore. 
Should I create a separate region in partition_manager.yml? If yes, how it should look like? 
What is recommended way to solve data retention in RAM between warm reboots (with bootloader)? 
Parents Reply
  • Hi, But does it really work when you have the MCUBOOT aswell ?

    MCUBOOT has its own noinit area that could differ from the one defined in the APP. And in the case of the nrf5340, MCUBOOT might use more RAM than the APP (since it has to define the mock_flash of 262KB for the netcore upgrade).

    So the noinit area of the APP might end up in the BSS area of the bootloader.

Children
No Data
Related