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

How can I read RESETREAS register using a softdevice?

Hello,

I would like to know how I can identify the reason for a reset in my device, I have read about the register NRF_POWER->RESETREAS but I don't know how to check it since I am using a softdevice.

I have read as well this post but I couldn't capture the reset reason with it, thus I am turning to the NRF_POWER->RESETREAS register.

Any hints?

Thanks in advance

Parents
  • Simply read that register right after your FW boots way before you enable SD. No conflict at that time, you can freely read the value (I actually believe you can read it like that even when SD is active but it doesn't matter).

  • I've checked SDK examples again and this seems to apply only to MBR commands when jumping to bootloader and back. However things like unfinished debug UART transfer or active SWD debugger can prevent your device from sleep. What is actual time between going to SYSTEM OFF and waking-up? Are you sure that going to SYSTEM OFF doesn't return error code (it should never return anything)? Can you disable all peripheral settings and verify that your system goes to SYSTEM OFF and doesn't wake up?

Reply
  • I've checked SDK examples again and this seems to apply only to MBR commands when jumping to bootloader and back. However things like unfinished debug UART transfer or active SWD debugger can prevent your device from sleep. What is actual time between going to SYSTEM OFF and waking-up? Are you sure that going to SYSTEM OFF doesn't return error code (it should never return anything)? Can you disable all peripheral settings and verify that your system goes to SYSTEM OFF and doesn't wake up?

Children
No Data
Related