2025-01-18 09:29 PM - last edited on 2025-01-20 12:51 AM by SofLit
im confused about the TIMPRE bit in the RCC_DCKCFGR does it only effect the apb1 and not apb2 timers cause the way it describes this bit it acts like the apb2 can be times 4 because it says PPREx so 1 or 2 but on cube mx im noticing when u enable the timer prescaler the only timers effected are the apb1 timers
2025-01-20 05:46 AM
The Reference Manual (RM) is more authoritative than CubeMX.
I don't use CubeMX. Show how RCC_DCKCFGR.TIMPRE is set in CubeMX and how that does/does not affect the timer clocks.
JW
2025-01-20 05:49 AM
Hello @Franksterb92,
This explanation is based on RM description:
if TIMPRE = 0:
if TIMPRE = 1:
Could you describe a concrete use case where you are noticing that only APB1 timers are affected?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-01-20 01:06 PM
it just confusing that it says that apb2 can be 4 times which would be 360mhz if hclk == 168mhz ... see what im saying
2025-01-20 02:11 PM
Yeah, I'm hard pressed to see it doing that too.
The PLL usually has a DIV2 out of the VCO, because it's a pulse-generator, and all the logic for the MCU/Peripheral are predicated on a 50/50 duty clock.
I think what's trying to be communicated is that if the APB is divided down the TIM can be faster, by skipping dividers in the HCLK/SYSCLK chains, not that it's actually multiplying anything.
Can be 168 MHz, not 336 MHz (or 180/360 for the higher clocking option), when the APBx is 42 MHz