Hi @danielmartynek ,
I checked the PRIMASK, before mode change, it is 0, and after wakeup it turns to 1 and remains 1. I tried to change it manually to 0 so I could get the interrupt.
The function EXECUTE_WAIT() is called when entering low power modes by driver. It is implemented as bellow:
#define EXECUTE_WAIT() \
do \
{ \
OsIf_ResumeAllInterrupts(); \
ASM_KEYWORD(" wfi"); \
OsIf_SuspendAllInterrupts(); \
} while (0)
if we enter run mode after wakeup interrupts stay suspended (PRIMASK = 1) because of OsIf_SuspendAllInterrupts(), so we need to resume interrupts and the driver doesn't do this.
If we repeatedly enter vlps mode interrupts get executed because of OsIf_ResumeAllInterrupts before wfi, my question is why are interrupts suspended in driver code after wakeup?