cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U575ZI LPTIM1 STOP mode Wake

Jeff Gros
Associate III

Hi All,

I'm struggling to get LPTIM1 to wake from STOP mode on the STM32U5 series parts. I have a STM32U575ZI Nucleo board. When I use SLEEP mode, the LPTIM1_IRQHandler in stem32u5xx_it.c is hit. When I use STOP mode, it is not. I made an example with CubeMx to make it as simple as possible. I'll attach the CubeMx ioc and main.c, but see below for the snippit with all the CubeMx comments removed. Presumably its not an issue with the LPBAM, as if I set the RCC->SRDAMR to all ones, it still fails.

Any ideas?
Thanks

Jeff

 

int main(void)
{
HAL_Init();
SystemClock_Config();
MX_LPTIM1_Init();

__HAL_RCC_LPTIM1_CLKAM_ENABLE();
HAL_LPTIM_Counter_Start_IT(&hlptim1);

while (1)
{
HAL_SuspendTick();
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); // Doesn't work
//???HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI); // Works
HAL_ResumeTick();
}
}

0 REPLIES 0