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 would comment out all GPIO/GPIOTE/ADC for the start and verify that your FW really goes to sleep and stays there. Make sure that all interrupts are cleared when you call sleep etc. (it should be visible in SDK examples). If that works then you can start to enable things one by one and you will see where is the problem. I suppose that each interface which you can enable you can also disable so once you find which one it should be straight forward how to fix it before going to sleep.

Reply
  • I would comment out all GPIO/GPIOTE/ADC for the start and verify that your FW really goes to sleep and stays there. Make sure that all interrupts are cleared when you call sleep etc. (it should be visible in SDK examples). If that works then you can start to enable things one by one and you will see where is the problem. I suppose that each interface which you can enable you can also disable so once you find which one it should be straight forward how to fix it before going to sleep.

Children
No Data
Related