CubeMX generates incorrect system clock init code?
Still very fresh with CubeMX and all this STM32 stuff, hope it is my fault. Or not?
In the Clock configuration tab in Cube 4.23 I've produced configuration that should set the HCLK and SYSCLK to 72 MHz
(not sure how it calculated this config, I have external osc. 8 MHz and must have 48 MHz for USB). The chip is STM32F446. See the picture below.
But, in the generated code in main.c after SystemClock_Config() SystemCoreClock value is 225,000,000.
If I understand correctly SystemCoreClock should be exactly the HCLK (or Sysclk?)
I know that the actual frequency is 72 MHz because I use debug output via ITM_SendChar, and entered 72Mhz in Keil debug settings. It prints

Today I upgraded this project to Cube v. 4.24 and libraries 1.19.0 and the
SystemCoreClock value still is 225,000,000.
This may be related to
https://community.st.com/0D50X00009Xkav1SAB
.Please advice...
Regards,
-- pa
#cubemx-4.23 #stm32f446 #cubemx-v4.24