If I debug the original STM32 source I come to the following line: SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull; With the values: HSE_VALUE = 25MHz prediv2factor = 5 pll2mull = 8 prediv1factor = 5 pllmull = 9