Hello,
I am using nRF Connect SDK v2.9.0. While working on the nRF52840 board, I used sys_poweroff() to put the board in deep sleep mode. But before calling it, I called
Hello,
I am using nRF Connect SDK v2.9.0. While working on the nRF52840 board, I used sys_poweroff() to put the board in deep sleep mode. But before calling it, I called
HI,
The system off demo demonstrate retention if build with CONFIG_APP_USE_RETAINED_MEM=y
. The RESETREAS exist on nRF54L15 as well, but is handled a bit differently in the SDK. You can refer to the print_reset_reason() function in the NFC system off sample which show how you can read it (the sample only decodes reasons relevant for the NFC sample, though).
When I added CONFIG_APP_USE_RETAINED_MEM=y, I got "attempt to assign the value 'y' to the undefined symbol APP_USE_RETAINED_MEM"
Also, I want to configure the retention in the running time before calling sys_poweroff()
In the reset reason, when I used print_reset_reason() function, I Got the same errors
Hi,
The CONFIG_APP_USE_RETAINED_MEM configuration is only valid in the sytem off demo. To use it outside of the demo, you can refer to the code that is included when you have it enabled (that means that retained.c is included in the build so refer to that, and see the code snippets in main.c that are included, CONFIG_APP_USE_RETAINED_MEM.
I suggest you experiment with the sample first, and observe that it works there, and then you will see how you can include thsi in your own project.
I set CONFIG_APP_USE_RETAINED_MEM= y in the system_off sample but unfortunately, I got the same error "attempt to assign the value 'y' to the undefined symbol APP_USE_RETAINED_MEM"
Hi,
That is odd. It works on my end, and is an important part of the sample. Did you put CONFIG_APP_USE_RETAINED_MEM=y in prj.conf? Also, can you confirm that the system_off sample you are using is the one under zephyr/samples/boards/nordic/system_off/?
If it still does not work, can you share the full sample project with your modification as well as the build output so that I see exactly what you are doing and can attempt to reproduce on my end?