Skip to main content
RAnan.3
Associate III
Apr 4, 2022 5:57 AM UTC
Solved

Does entering sleep mode stop general purpose timer in STM32CubeMX

Iam using STM32L452RC. I want my controller to go in sleep mode when received an interrupt from USB CDC. While exploring I got these two lines from data sheet

The Normal Sleep mode stops the processor clock, but all peripherals keep on running. On the STM32 clock tree, that means:

■ FCLK (Cortex Clock) stops

■ All the other activated clocks run

This says FCLK (Cortex Clock) stops. Will this affect the timers. I use TIM2 for my project which is a general purpose timer.

This topic has been closed for replies.
Artur IWANICKIBest answer
ST Employee
Apr 4, 2022 1:48 PM UTC

Hello,

Sleep mode will not stop timer2. APB1, APB2 clocks (used for peripherals, including timers) are still running. General purpose timers are stopped in STOP modes as all high frequency clocks are frozen in this state.

2 replies

Artur IWANICKIBest answer
ST Employee
Apr 4, 2022 1:48 PM UTC

Hello,

Sleep mode will not stop timer2. APB1, APB2 clocks (used for peripherals, including timers) are still running. General purpose timers are stopped in STOP modes as all high frequency clocks are frozen in this state.

RAnan.3
RAnan.3Author
Associate III
Apr 5, 2022 8:19 AM UTC

Thank you.