cancel
Showing results for 
Search instead for 
Did you mean: 

Troubleshooting Low Clock Speed on STM32F39ZI Board

newtonkelvin75
Associate

 

Hello everyone,

I'm encountering an issue with achieving the desired clock speed on my STM32F39ZI-based board. I have configured the clock speed to be 180 MHz using mbedOS and PlatformIO, but the actual clock speed seems to be lower than expected. Here are some details:

  • Board: STM32F39ZI
  • Development Environment: PlatformIO IDE with mbedOS
  • Desired Clock Speed: 180 MHz
  • Configuration: I have modified the mbed_app.json file to set the clock speed as follows:

 

json
"target_overrides": { "*": { "target.clock_speed": 180000000, "target.printf_lib": "std" }, "NUCLEO_F39ZI": { "target.clock_source": "USE_PLL_HSE_EXTC | USE_PLL_HSI", "target.override_default_sys_clock": "1", "target.default_sys_clock": "180000000" } }
  • Issue: Despite the above configuration, the actual clock speed appears to be lower than 180 MHz.

I have verified the board's documentation and ensured that it should support this clock speed. I have also checked the oscillator setup and confirmed that the external crystal is properly connected.

Can anyone provide guidance on possible reasons for this discrepancy and suggest troubleshooting steps? Is there any specific clock initialization code or additional configuration that I should be aware of to achieve the desired clock speed on the STM32F39ZI board?

Thank you in advance for your help!

2 REPLIES 2
AScha.3
Chief II

STM32F39ZI ??  maybe F439 ?

i would use and try CubeMX , set clocktree to get 180M , then look, what code is generated .

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

> but the actual clock speed seems to be lower than expected.

> Despite the above configuration, the actual clock speed appears to be lower than 180 MHz.

What evidence leads you to believe this? What clock speed does it appear to be at? If 16 MHz, probably the HSE/PLL failed and it's using HSI. If a multiple of 25/8, probably the HSE_VALUE is wrong.

You could output MCO to verify clock speed, or use a timer pin.

Checking the return values of the various HAL_* clock setup functions is also a good indicator.

Checking your HSE_VALUE is defined correctly could also be the problem.

If you feel a post has answered your question, please click "Accept as Solution".