UM1581
Decreasing the CPU frequency
RCC_SYSCLKConfig()
RCC_GetSYSCLKSource()
RCC_HCLKConfig()
RCC_PCLK1Config()
RCC_PCLK2Config()
RCC_GetClocksFreq()
18.2.4
Peripheral clocks configuration functions
This section provide functions allowing to configure the Peripheral clocks.
1.
The RTC clock which is derived from the LSE, LSI or HSE_Div32 (HSE divided by
32).
2.
After restart from Reset or wakeup from STANDBY, all peripherals are off except
internal SRAM, Flash and SWD. Before to start using a peripheral you have to enable
its interface clock. You can do this using RCC_AHBPeriphClockCmd(),
RCC_APB2PeriphClockCmd() and RCC_APB1PeriphClockCmd() functions.
3.
To reset the peripherals configuration (to the default state after device reset) you can
use RCC_AHBPeriphResetCmd(), RCC_APB2PeriphResetCmd() and
RCC_APB1PeriphResetCmd() functions.
RCC_ADCCLKConfig()
RCC_I2CCLKConfig()
RCC_TIMCLKConfig()
RCC_USARTCLKConfig()
RCC_USBCLKConfig()
RCC_RTCCLKConfig()
RCC_I2SCLKConfig()
RCC_RTCCLKCmd()
RCC_BackupResetCmd()
RCC_AHBPeriphClockCmd()
RCC_APB2PeriphClockCmd()
RCC_APB1PeriphClockCmd()
RCC_AHBPeriphResetCmd()
RCC_APB2PeriphResetCmd()
RCC_APB1PeriphResetCmd()
Check that the new number of WS is taken into account by reading FLASH_ACR
Modify the CPU clock source, using "RCC_SYSCLKConfig()" function
If needed, modify the CPU clock prescaler by using "RCC_HCLKConfig()"
function
Check that the new CPU clock source is taken into account by reading the clock
source status, using "RCC_GetSYSCLKSource()" function
Modify the CPU clock source, using "RCC_SYSCLKConfig()" function
If needed, modify the CPU clock prescaler by using "RCC_HCLKConfig()"
function
Check that the new CPU clock source is taken into account by reading the clock
source status, using "RCC_GetSYSCLKSource()" function
Program the new number of WS, using "FLASH_SetLatency()" function
Check that the new number of WS is taken into account by reading FLASH_ACR
Disable the Flash Prefetch buffer using "FLASH_PrefetchBufferCmd(DISABLE)"
function
Check that Flash Prefetch buffer deactivation is taken into account by reading
FLASH_ACR using the FLASH_GetPrefetchBufferStatus() function.
DocID023800 Rev 1
Reset and clock control (RCC)
315/584
Need help?
Do you have a question about the STM32F31xx and is the answer not in the manual?