Hello, I am using the STM32L4 (nucleo-l476rg board) and am attempting to enter the mcu's low-power modes (i.e. Stop1, Stop2, Standby). Within stm32_idle.c under PM_IDLE, I send the "wfi" command to send the device into sleep. However, when measuring the current draw of the mcu, I can see that the device is drawing much more power than it should be from any of the low-power modes. It appears that it is either not entering the low-power modes or is quickly woken out of them. I have enabled Tickless OS using its interval timer to prevent scheduler interrupts that would bring the device out of lp modes. Is there something that I am missing?
Below are my configurations that seemed relevant to the problem at hand. CONFIG_STM32L4_TIM2=y CONFIG_STM32L4_TIM5=y # # Timer Configuration # CONFIG_STM32L4_ONESHOT=y CONFIG_STM32L4_FREERUN=y CONFIG_STM32L4_TICKLESS_ONESHOT=2 CONFIG_STM32L4_TICKLESS_FREERUN=5 CONFIG_STM32L4_ONESHOT_MAXTIMERS=1 # # Clocks and Timers # CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_SCHED_TICKLESS=y # CONFIG_SCHED_TICKLESS_ALARM is not set CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2018 CONFIG_START_MONTH=1 CONFIG_START_DAY=1 CONFIG_PREALLOC_TIMERS=4 # # Buffering # # CONFIG_DRVR_WRITEBUFFER is not set # CONFIG_DRVR_READAHEAD is not set # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set # CONFIG_ARCH_HAVE_SDIO_PREFLIGHT is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_EFUSE is not set # CONFIG_PIPES is not set CONFIG_PM=y CONFIG_PM_NDOMAINS=1 CONFIG_PM_GOVERNOR_GREEDY=y # CONFIG_PM_GOVERNOR_ACTIVITY is not set # # Governor options # CONFIG_SERIAL_PM_ACTIVITY_DOMAIN=0 CONFIG_SERIAL_PM_ACTIVITY_PRIORITY=6 As a side note, I noticed that the tickless OS interval and freerunning timers for the nucleo-l476rg seems to only support TIM channels, and not LPTIM. As the TIM channels are not operational during low-power modes, will I be unable to use the tickless OS interval timer without rewriting the code that is done to set up the tickless oneshot timer? Any support on this would be greatly appreciated, Jesse Jensen (he, him, his) Geotab Embedded Engineer Direct Toll-free Visit +1 (702) 409-1041 +1 (800) 397-7102 www.geotab.com Twitter <https://twitter.com/geotab> | Facebook <https://www.facebook.com/Geotab> | YouTube <https://www.youtube.com/user/MyGeotab> | LinkedIn <https://www.linkedin.com/company/geotab/>