Page 1 of 1

STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Posted: Wed Feb 23, 2022 2:11 pm
by alexblack
Hi.
For the STM32G031 and STM32G030 (maybe other G0 mcu too) there is an errata:

Code: Select all

2.5.5 TIM16 and TIM17 are unduly clocked by SYSCLK
Description
The timers TIM16 and TIM17 are unduly clocked by SYSCLK instead of being clocked by the timer clock
TIMPCLK. As a consequence, they do not reflect AHB and APB prescaler settings.
The TIM16 and TIM17 are fully functional as long as the SYSCLK-to-PCLK frequency ratio remains smaller than
or equal to four.

This fact is not taken into account, so in my project the frequency of timer TIM17 is set incorrectly, when I set the STM32_PPRE bigger then 2.

Re: STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Posted: Wed Feb 23, 2022 2:28 pm
by Giovanni
Uhm, nice finding, I hope it will stay this way at least.

Giovanni

Re: STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Posted: Wed Mar 16, 2022 12:41 pm
by Giovanni
Hi,

Fixed as bug #1226.

Giovanni