Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
2 years, 3 months ago.
Changing stm32L4 clock speed to 26 Mhz
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 [https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/system_clock.c#L80]. 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?