Disabling all interrupt pending bits before entering STOP mode in STM32L1x
As mentioned in STM32L152R reference manual, before entering the STOP mode, all EXTI, peripherals and RTC interrupt pending bits should be reset, otherwise the stop mode entrance is ignored. Is there any way to perform this at once?