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

nRF52 spurious resets with SDK12.2.0 - How to resolve?

Hello,

we have developed a solar powered LED module with an additional battery. It is based on the nrf52832. The WDT and TWI is mainly used and for BLE the soft device is applied. From time to time, the NRF resets itself. I do not really know, how to debug the problem, as it takes days or even weeks that it happens. Using RTT does not work, as it clears it buffers when reseting. We tried to store every possible error as some int value in the flash, but for that specific error, nothing is written. So we do not know what the problem could be. The TWI implementation uses timeouts and un/init in case of an error. Thus I do not believe that this is the problem.

Any suggestions to gain more insights?

[Update: The RESETREAS register is telling me 0x00000004; thus software reset. I implemented 'assert_nrf_callback(uint16_t, const uint8_t*)', 'app_error_fault_handler(uint32_t, uint32_t, uint32_t)' and 'HardFault_Handler(void)' and have there a while loop. As the WDT is activated, a WDT event should occur if these functions are active. I do not use 'NVIC_SystemReset()'. So how to proceed? Right now it is getting critical, as we get some complains about that spurious resets ... ]

Thanks.

Parents
  • I'm just following this thread, feel free to discount my blue sky rambling. If the code just got lost and jumped to address zero (the reset vector) would RESETREAS be set to 4? I am wondering how RESETREAS is implemented in HW, since it is a register in POWER device, how does it know that some code, in the function nvic_softreset(), twiddled the AIRCR register to reset the cpu? Also, is a reset from the debug hw marked as a soft reset 4 in RESETREAS or not noted at all? Also, the "CPU lockup" in the "Reset behavior" section, how does that manifest in RESETREAS, or not at all? Finally, I just read the blog here about the Jumper emulator, which might find strange HW problems. Could you emulate your system faster than the system itself actually runs and find your spurious reset in less time?

Reply
  • I'm just following this thread, feel free to discount my blue sky rambling. If the code just got lost and jumped to address zero (the reset vector) would RESETREAS be set to 4? I am wondering how RESETREAS is implemented in HW, since it is a register in POWER device, how does it know that some code, in the function nvic_softreset(), twiddled the AIRCR register to reset the cpu? Also, is a reset from the debug hw marked as a soft reset 4 in RESETREAS or not noted at all? Also, the "CPU lockup" in the "Reset behavior" section, how does that manifest in RESETREAS, or not at all? Finally, I just read the blog here about the Jumper emulator, which might find strange HW problems. Could you emulate your system faster than the system itself actually runs and find your spurious reset in less time?

Children
No Data
Related