cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429ZI CubeMX APB2 timer clock confusion

Saveliy Tronza
Associate
Posted on February 25, 2018 at 23:30

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.

#stme32-cube #cubemx-clock-configuration-tab
1 ACCEPTED SOLUTION

Accepted Solutions
Amel NASRI
ST Employee
Posted on February 26, 2018 at 13:56

Hi

sparker_95

‌,

The configuration using STM32F429ZI device is correct. The one using NUCLEO-F429ZI is wrong. I reported it to our STM32CubeMX team.

If you update an output parameter (HCLK or APB2 peripheral clocks for example), it will recalculate the values to put correct ones this time:

0690X00000609otQAA.png

-Amel

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.

View solution in original post

3 REPLIES 3
Amel NASRI
ST Employee
Posted on February 26, 2018 at 13:56

Hi

sparker_95

‌,

The configuration using STM32F429ZI device is correct. The one using NUCLEO-F429ZI is wrong. I reported it to our STM32CubeMX team.

If you update an output parameter (HCLK or APB2 peripheral clocks for example), it will recalculate the values to put correct ones this time:

0690X00000609otQAA.png

-Amel

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.

Posted on February 26, 2018 at 17:36

Thanks, Amel! I'm glad to know that my understanding of the device is correct.

Houda GHABRI
ST Employee
Posted on May 11, 2018 at 15:28

Hi

sparker_95

,

This issue will be fixed in next cubeMX release.

Best regards,

Houda