2024-11-29 03:00 AM
Hello ST Community,
After running some tests on a board with an STM32H562 microcontroller and using an oscilloscope, I detected what might be a bug in the HAL. I was using the HAL function HAL_RCCEx_GetPeriphCLKFreq() to retrieve the clock frequency of a specific peripheral, in this case, SPI2 (whose clock source was PLL1Q). However, I was getting a value significantly different from the expected one.
After validating the clock tree through the IDE, I decided to measure the signal with an oscilloscope to better understand the issue. There, I observed the expected 125 MHz instead of the 140 MHz reported by the HAL function.
Do you have any idea what might be causing this?
2024-11-29 05:21 AM - edited 2024-11-29 05:29 AM
Hello @vaa2ovr ,
Which CubeH5 version are you using ?
Please make sure to use the latest release STM32CubeH5 v1.4.0 as contains limitation fixes related to HAL_RCCEx_GetPLLxClockFreq.
From my side, I will check this with latest release and keep you updated.
2024-11-29 05:22 AM
Hello,
Could you please share your project?
Also how did you measure the frequency? on MCO pin?