2022-08-10 07:21 AM
We track known (i.e. programmed) wake sources and report them at wake. The wake is not reporting any know source. The wake seems to be a loop, i.e. as soon as we enter sleep, the wake occurs.
/* Set SLEEPDEEP bit of Cortex System Control Register */
SET_BIT (SCB->SCR, SCB_SCR_SLEEPDEEP_Msk);
/* Ensure that all instructions are done before entering STOP mode */
__DSB ();
__ISB ();
/* Request Wait For Interrupt */
__WFI ();
2022-08-10 10:37 AM
I think you have to repeat this, as WFI will drop thru if it causes interrupt service.
Mop up all pending interrupts