2020-10-19 07:18 AM
Hi. I have an application where I am using the LPTIM1 from an STM32L072 as a tick source for FreeRTOS. I am using the Idle Hook (not the tickless idle, that just did not work for me) to make the microcontroller reach STOP mode with a global variable from other task. To make the system wake up less often, I am using the minimum timeout when I am running my application and the maximum on the LPTIM when I want to put the MCU to sleep (besides disabling the other peripherals, my application only runs every hour and wakes up with the RTC).
Everything is working fine so far. Is there any pitfall that I need to take into consideration when doing this? Is it in any way unsafe to do?
Thanks in advance :)