AnsweredAssumed Answered

STM32L0 Cannot wakeup from STOP with LPTIM IRQ ?

Question asked by bastide.laurent on Sep 21, 2017

Hello,

I'm trying to wake up from STOP mode using LPTIMer on STM32L071.

LPTIM is clocked by LSE(32K) used as a simple upcounter, and I'm using both ARR and CMP Interrupts from LPTIM, so corresponding bits are set in LPTIM1->IER and NVIC->ISER.

For the purpose of using it in low-power modes I did the following extra steps:

- set LPTIM1SMEN bit in RCC->APB1SMENR

- set EXTI_IMR_IM29 in EXTI->IMR that should let EXTI29/LPTIM IRQ generate a wakeup from STOP event.

It works fine in various sleep modes unless I go to STOP (SLEEPDEEP bit in SCB->SCR) where I stay stuck.

I looked into STM32Cube examples (LPTIM_Timeout,LPTIM_PWM_LSE) and I did not find a clue.

Strangely enough, functions like HAL_LPTIM_Counter_Start_IT even write in bits that doesn't exist in the reference manual like bit 29 of EXTI->RTSR or FTSR... Of course I gave it a try, but without results.

So am I missing something ?

 

Best regards,

Laurent

Outcomes