2018-02-25 02:30 PM
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-tabSolved! Go to Solution.
2018-02-26 04:56 AM
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:
-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.
2018-02-26 04:56 AM
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:
-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.
2018-02-26 09:36 AM
Thanks, Amel! I'm glad to know that my understanding of the device is correct.
2018-05-11 06:28 AM
Hi
sparker_95
,This issue will be fixed in next cubeMX release.
Best regards,
Houda