STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
alexblack
Posts: 277
Joined: Mon Sep 24, 2012 3:52 pm
Been thanked: 33 times

STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14894
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Post by Giovanni »

Uhm, nice finding, I hope it will stay this way at least.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14894
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32G031 TIM16/TIM17 CLOCK CALUCLATING ERROR

Post by Giovanni »

Hi,

Fixed as bug #1226.

Giovanni
Post Reply