I am using a Nucleo L152RE for a simple interrupt driven application.
I am using an external interrupt (EXTI0) and tim6 interrupt.
Everything works fine but when I try to use HAL_PWR_EnterSLEEPMode (PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI) to save some power during non-activity, the system crashes, does not make it out of sleep mode.
The program counter ends up at line 130 in startup_stm32l152xe.s line 130 b Infinite_Loop which seems to be the WWDG_IRQ handler. The watchdog is not enabled and what I have found so far indicates that this is caused by an interrupt that is not handled. I have not been able to find a cause. I cannot find any interrupts enabled other than the what I am intending to use.
I am probably making a rookie mistake but would appreciate any help/pointers.