Question
Changing stm32L4 clock speed to 26 Mhz
Posted on June 03, 2018 at 01:41
Hello, I just want to make sure what I'm doing is right. I'm using MBED and stm32L4. I want to change clock speed to 26 Mhz, I plan to use MSI as input. In order to do so, I will change the parameter PLL_M and leave the rest of the parameters as they are in the method
uint8_t
SetSysClock_PLL_MSI
(
void
)
defined in []. To calculate PLL_m , I solve for it in the equation: SystemClock = ((MSI / PLL_M) * PLL_N) / PLL_R and set the SystemClock to 26 Mhz. Then I will call the method from my main program to change the clock speed. Can someone please correct me if I'm doing anything wrong?