cancel
Showing results for 
Search instead for 
Did you mean: 

TIM still running in STOP

Carl_G
Senior

I am using TIM2 to create PWMs for LEDs. When I enter STOP mode I expect the PWM to stop. Yet it does not. From the manual TIM do not have wakeup capability from stop mode. So they should not be requesting the HSI to operate.

What could possibly cause the HSI to continue to operate in STOP mode. I am waking in 5s from RTC. during this whole time and continuously uninterrupted as far as I can tell the PWM keep going. Shouldn't they stop?

HSIKERON is 0.

1 REPLY 1
Carl_G
Senior

Seems setting the debug in STOP mode can cause this. It allows the "internal RC oscillator" clock to feed FCLK and HCLK. While it is unclear exactly which internal RC oscillator they mean, it would seem this is the culprit. Turning this feature off allows the HSI or at least TIM2 to stop. This should probably be listed in the RCC and/or PWR section as a caveat.