2025-10-13 1:04 PM - last edited on 2025-10-15 3:36 AM by mƎALLEm
I was trying to get the most out of my H563 set up and run as fast as possible.
I am using the Nucleo-H563 board.
I reconfigured in CubeMX to use System clock mux to use HSE source mux, multipliers and dividers set correctly for 250MHZ operation. There are no errors shown in the setup and I am showing 250 Mhz as the SYSCLK. My AHB is /1, HCLK shows 250MHZ which is feeding the peripheral busses.
While the clock configuration APB1 shows 250Mhz it does not seem to be correct as when I set the timers and prescalers for such the timing is not correct... the bus seems to be running at 125mhz.
For my TMR1 to get 1us clock I have to set the divider to 124 which implies the internal clock is running at 125Mhz not 250 like the clock diagram shows.
I have attached the Clock Configuration from CubeMX that shows no clock issues.
2025-10-15 10:21 AM - edited 2025-10-15 10:22 AM
> setting a loop gpio loop with HAL_Delay(1) does show 1ms exactly but that does not mean much.
On the contrary, a loop with HAL_Delay(1) will do 2 ms delays, not 1 ms delays. If it's showing 1ms that suggests clock is not configured correctly.
Would be a better test if you did HAL_Delay(1000).
2025-10-15 11:54 AM
I understand that the clock is indeed running at 250Mhz. the reason I put no confidence in using HAL_Delay is I can get the same results using a whole bunch of different values of system clock. What gives me the most confidence was SystemCoreClock returning 250000000!