We have a device which is used with NXP1115/303 MCU(cortex M0 core). Application doesn't do much, most of the time it sleeps in the deep power mode since the device is on 3V lithium batery. The system do a soft reset every 30sec. Reset is implemented via Reset Control Register by setting SYSRESETREQ attribute(NVIC_SystemReset function):
__STATIC_INLINE void NVIC_SystemReset(void)
SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
for(;;) /* wait until reset */
The Reset Handler looks like this:
EXPORT Reset_Handler [WEAK]
LDR R0, =__main
SystemInit is at the beggining of the main function.
The issue is that MCU sometimes hangs up after the reset procedure. But it's not every time. It hangs up quite randomly, approx. 1 out of 100k(or even more) resets. It's clear that it doesn't hang up in the SystemInit or in the main. It's not really clear what is happening with the MCU at the hang up state, but it looks like it is in lock up state.
Some known information:
Is there any suggestions which can be tried? Any ideas is welcome!
UPDATED: even when reset is made by WDT (feeding the wrong sequence) the same situation occurs.