2019-04-06 02:23 PM
I want to set up the interrupt for system power off the main MCU, the STM32L4 xx .
As soon it is powered on, then starting the timer to turn it off after 2- to- 4 Hours.
Please point me how to implement it since I'm still new for STM32L4xx
2019-04-06 10:17 PM
You probably have to look at RTC with alarms as the duration required here is quite long.
Otherwise, use the LPTIM which should have its own clock local source
2019-04-07 12:32 AM
Thanks
But I'm in using its internal RC as the system clock (no external X-tal )
Could it be OK for your idea?
2019-04-07 12:42 AM
the 32-bit Timer2 with a 16-bit prescaler set will easily meet your requirement
2019-04-07 05:55 AM
On stm32l4 most peripherals can run with their own chosen clock source... For optimum power saving. Checkout the LPTIMER