AnsweredAssumed Answered

STM32F429ZI CubeMX APB2 timer clock confusion

Question asked by Saveliy Tronza on Feb 25, 2018
Latest reply on May 11, 2018 by houda ghabri

Hello!

 

I'm new to STM32 so I can be wrong everywhere.

 

According to datasheet(RM0090 Reference manual STM32F405/415, STM32F407/417, STM32F427/437 and
STM32F429/439 advanced ARM®-based 32-bit MCUs, page 152), "When TIMPRE bit of the RCC_DCKCFGR register is reset, if APBx prescaler is 1, then TIMxCLK = PCLKx, otherwise TIMxCLK = 2x PCLKx".

If I create a new STM32CubeMX project for STM32F429ZI, I can see the expected behaviour: for APB2 prescaler value higher than 1, the APB2 timer clocks are set to twice that value.

But If I create a project for Nucleo-F429ZI board and say 'Yes' to 'Initialize all peripherals with their default Mode', the APB2 timer clock always stays at 1xAPB2 clock, regardless of APB2 prescaler value. However, on the real dev. board the timer clock seems to be at twice the APB2 clock rate.

 

Initially I was wondering, why was my timer running at double rate compared with what I should get based on the timer clock shown by Cube. I assume that Cube software is wrong here.

 

I've attached two screenshots, one showing clock configuration in a new project, the other one showing the default clock configuration for the board.

Attachments

Outcomes