Clock frequency change
Posted: Tue Sep 01, 2020 5:00 pm
I know that my Nucleo L476 is working with the maximum frequency (80 MHz) and consumes about 60 mA. To reduce the power consumption, I want to try reducing the frequency from 80MHz to for example 32 MHz with Arduino IDE.
I know that there is a file (variant.cpp) that includes all the information regarding to clocks which is a mirror of what Stm32CubeMX presents for clock configuration. A part of this file represents the following:
Which parameter should be changed?
I know that there is a file (variant.cpp) that includes all the information regarding to clocks which is a mirror of what Stm32CubeMX presents for clock configuration. A part of this file represents the following:
Code: Select all
/**
* @brief System Clock Configuration
* The system Clock is configured as follows :
* System Clock source = PLL (MSI)
* SYSCLK(Hz) = 80000000
* HCLK(Hz) = 80000000
* AHB Prescaler = 1
* APB1 Prescaler = 1
* APB2 Prescaler = 1
* MSI Frequency(Hz) = 4000000
* PLL_M = 1
* PLL_N = 40
* PLL_R = 2
* PLL_P = 7
* PLL_Q = 4
* Flash Latency(WS) = 4
* @param None
* @retval None
*/