2015-07-07 08:07 PM
Hello:
I have an STM32F405 processor, with a 8MHz HSE crystal. It's set up to operate at 168MHz. To see if I can get suitable performance at a lower speed to save power, I'd like to change this (*not* on the fly) at the program start to 84MHz. Is this done by changing the HSE value? It cannot be that simple...as I understand it, the HSE value must match the actual crystal frequency. Thank you...2015-07-09 08:43 PM
#if defined (PLL_SOURCE_HSI)
uint32_t SystemCoreClock = (((HSI_VALUE / PLL_M )* PLL_N) / PLL_P);
#else
uint32_t SystemCoreClock = (((HSE_VALUE / PLL_M )* PLL_N) / PLL_P);
#endif
2015-07-09 09:34 PM
much better than hard coding the value...thanks clive1
2015-07-09 09:52 PM