![]() |
nRF5 SDK
v12.0.0
|
| Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API |
The RAM Retention Example shows RAM retention mode usage and verification. It configures the system for RAM retention and then triggers System OFF. Button 1 wakes up the system. The application then checks if the RAM state is conserved by verifying that the value written before going to System OFF is the same.
--------------
| RESET |
--------------
|
---------------
| Configure |
| BSP |
---------------
|
READ GPREGRET Register
|
---------------------
NO <--| SYSTEM_OFF_RESET? |--> YES
| --------------------- |
| |
------------------------- ---------------------
| Write to GPREGRET | | Read loop count/ |
| test word + loop_count |<- ---| MAX reached? |--->NO
------------------------- | | --------------------- |
| | | ------------------------ ----------------
------------------------ | YES | Verify RAM retention? |-->FAILURE-->| Loop forever |
| Enable RAM RETENTION | | | ------------------------ ----------------
------------------------ | STOP | ^
| | SUCCESS |
------------------------ | ------------- | |
| WRITE_TEST_BYTE_TO_RAM | --True---| ++Loop < 6? |<-------- |
------------------------ ------------- |
| | |
-------------------- False |
| Trigger System OFF | | |
-------------------- ----------------------------------------------------You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\ram_retention
Button assignments:
Test the RAM Retention Example application by performing the following steps: