Hi again,
I made a simple application based on which I could confirm that pending external interrupt causes not entering low power mode. E.g. GPIO pin interrupt, among many others.
I cannot confirm if pending System interrupts like SysTick or could cause not entering low power mode? I assumed that technically they can, could you confirm?
To wrap up:
* low power mode is not entered if there is any pending interrupt, section 14.4 in UM11126, rev 2.4
* even while SysTick interrupts or exceptions on NVIC are disabled, they can still reach the pending state
Solution:
* disable all interrupts, section 3.3.1 in UM11126, rev 2.4
* on all peripherals which had interrupts enabled before going to low power mode
* system interrupts, like SysTick
* clear pending interrupts before going to low power mode
* Involves clearing peripheral interrupts on NVIC register and SysTick and PendSV interrupts on SCB register