Question
STM32L152 - Stop Mode not working when using RTC Wakup
Posted on June 18, 2011 at 19:13
Hello,
just expierenced some strange problem. My app should go to Stop Mode and wake up when a signal on an EXTI line is detected or every 10s by RTC wakeup. Without the RTC wakeup everything works fine, but when I activate the RTC wakeup, the PWR_EnterSTOPMode() seems to have no effect at all. Code looks basically like this (LSE is used as RTC source, controller is running on MSI @2Mhz): ... GPIO_Config(); RTC_Config(); SysTick_Config (2000000 / 100); // approx 10ms interruptRTC_WakeUpCmd(ENABLE);
PWR_VoltageScalingConfig(PWR_VoltageScaling_Range3); PWR_UltraLowPowerCmd(ENABLE); PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI); ... When I remove RTC_WakeUpCmd(ENABLE); everything is OK, Stop Mode is working, power consumption is approx 1.4uA. Any ideas... what am I doing wrong?? I already tried inserting PWR_ClearFlag(PWR_FLAG_WU); before entering stop mode, just to be sure. No success. Thanks in advance, Johannes One additional note: Just took the code and loaded it (after some minor adaptions) on a STM32F205 - No problems there, everything works as it should. #stop-mode #stm32l #stm32l-stop-mode