Functions |
| void | RCC_RTCCLKConfig (uint32_t RCC_RTCCLKSource) |
| | Configures the RTC clock (RTCCLK).
|
| void | RCC_RTCCLKCmd (FunctionalState NewState) |
| | Enables or disables the RTC clock.
|
| void | RCC_BackupResetCmd (FunctionalState NewState) |
| | Forces or releases the Backup domain reset.
|
| void | RCC_I2SCLKConfig (uint32_t RCC_I2SCLKSource) |
| | Configures the I2S clock source (I2SCLK).
|
| void | RCC_AHB1PeriphClockCmd (uint32_t RCC_AHB1Periph, FunctionalState NewState) |
| | Enables or disables the AHB1 peripheral clock.
|
| void | RCC_AHB2PeriphClockCmd (uint32_t RCC_AHB2Periph, FunctionalState NewState) |
| | Enables or disables the AHB2 peripheral clock.
|
| void | RCC_AHB3PeriphClockCmd (uint32_t RCC_AHB3Periph, FunctionalState NewState) |
| | Enables or disables the AHB3 peripheral clock.
|
| void | RCC_APB1PeriphClockCmd (uint32_t RCC_APB1Periph, FunctionalState NewState) |
| | Enables or disables the Low Speed APB (APB1) peripheral clock.
|
| void | RCC_APB2PeriphClockCmd (uint32_t RCC_APB2Periph, FunctionalState NewState) |
| | Enables or disables the High Speed APB (APB2) peripheral clock.
|
| void | RCC_AHB1PeriphResetCmd (uint32_t RCC_AHB1Periph, FunctionalState NewState) |
| | Forces or releases AHB1 peripheral reset.
|
| void | RCC_AHB2PeriphResetCmd (uint32_t RCC_AHB2Periph, FunctionalState NewState) |
| | Forces or releases AHB2 peripheral reset.
|
| void | RCC_AHB3PeriphResetCmd (uint32_t RCC_AHB3Periph, FunctionalState NewState) |
| | Forces or releases AHB3 peripheral reset.
|
| void | RCC_APB1PeriphResetCmd (uint32_t RCC_APB1Periph, FunctionalState NewState) |
| | Forces or releases Low Speed APB (APB1) peripheral reset.
|
| void | RCC_APB2PeriphResetCmd (uint32_t RCC_APB2Periph, FunctionalState NewState) |
| | Forces or releases High Speed APB (APB2) peripheral reset.
|
| void | RCC_AHB1PeriphClockLPModeCmd (uint32_t RCC_AHB1Periph, FunctionalState NewState) |
| | Enables or disables the AHB1 peripheral clock during Low Power (Sleep) mode.
|
| void | RCC_AHB2PeriphClockLPModeCmd (uint32_t RCC_AHB2Periph, FunctionalState NewState) |
| | Enables or disables the AHB2 peripheral clock during Low Power (Sleep) mode.
|
| void | RCC_AHB3PeriphClockLPModeCmd (uint32_t RCC_AHB3Periph, FunctionalState NewState) |
| | Enables or disables the AHB3 peripheral clock during Low Power (Sleep) mode.
|
| void | RCC_APB1PeriphClockLPModeCmd (uint32_t RCC_APB1Periph, FunctionalState NewState) |
| | Enables or disables the APB1 peripheral clock during Low Power (Sleep) mode.
|
| void | RCC_APB2PeriphClockLPModeCmd (uint32_t RCC_APB2Periph, FunctionalState NewState) |
| | Enables or disables the APB2 peripheral clock during Low Power (Sleep) mode.
|
| void | RCC_RTCResetCmd (FunctionalState NewState) |
| | Forces or releases the RTC peripheral and associated resources reset.
|
| void | RCC_AHBPeriphClockCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState) |
| | Enables or disables the AHB peripheral clock.
|
| void | RCC_AHBPeriphResetCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState) |
| | Forces or releases AHB peripheral reset.
|
| void | RCC_AHBPeriphClockLPModeCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState) |
| | Enables or disables the AHB peripheral clock during SLEEP mode.
|
Peripheral clocks configuration functions.
===============================================================================
Peripheral clocks configuration functions
===============================================================================
This section provide functions allowing to configure the Peripheral clocks.
1. The RTC clock which is derived from the LSI, LSE or HSE clock divided by 2 to 31.
2. After restart from Reset or wakeup from STANDBY, all peripherals are off
except internal SRAM, Flash and JTAG. 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.
4. To further reduce power consumption in SLEEP mode the peripheral clocks can
be disabled prior to executing the WFI or WFE instructions. You can do this
using RCC_AHBPeriphClockLPModeCmd(), RCC_APB2PeriphClockLPModeCmd() and
RCC_APB1PeriphClockLPModeCmd() functions.
===============================================================================
Peripheral clocks configuration functions
===============================================================================
This section provide functions allowing to configure the Peripheral clocks.
1. The RTC/LCD clock which is derived from the LSE, LSI or 1 MHz HSE_RTC (HSE
divided by a programmable prescaler).
2. After restart from Reset or wakeup from STANDBY, all peripherals are off
except internal SRAM, Flash and JTAG. 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.
4. To further reduce power consumption in SLEEP mode the peripheral clocks can
be disabled prior to executing the WFI or WFE instructions. You can do this
using RCC_AHBPeriphClockLPModeCmd(), RCC_APB2PeriphClockLPModeCmd() and
RCC_APB1PeriphClockLPModeCmd() functions.
Enables or disables the Low Speed APB (APB1) peripheral clock.
- Note:
- After reset, the peripheral clock (used for registers read/write access) is disabled and the application software has to enable this clock before using it.
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2: TIM2 clock
- RCC_APB1Periph_TIM3: TIM3 clock
- RCC_APB1Periph_TIM4: TIM4 clock
- RCC_APB1Periph_TIM5: TIM5 clock
- RCC_APB1Periph_TIM6: TIM6 clock
- RCC_APB1Periph_TIM7: TIM7 clock
- RCC_APB1Periph_TIM12: TIM12 clock
- RCC_APB1Periph_TIM13: TIM13 clock
- RCC_APB1Periph_TIM14: TIM14 clock
- RCC_APB1Periph_WWDG: WWDG clock
- RCC_APB1Periph_SPI2: SPI2 clock
- RCC_APB1Periph_SPI3: SPI3 clock
- RCC_APB1Periph_USART2: USART2 clock
- RCC_APB1Periph_USART3: USART3 clock
- RCC_APB1Periph_UART4: UART4 clock
- RCC_APB1Periph_UART5: UART5 clock
- RCC_APB1Periph_I2C1: I2C1 clock
- RCC_APB1Periph_I2C2: I2C2 clock
- RCC_APB1Periph_I2C3: I2C3 clock
- RCC_APB1Periph_CAN1: CAN1 clock
- RCC_APB1Periph_CAN2: CAN2 clock
- RCC_APB1Periph_PWR: PWR clock
- RCC_APB1Periph_DAC: DAC clock
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
- Note:
- After reset, the peripheral clock (used for registers read/write access) is disabled and the application software has to enable this clock before using it.
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2
- RCC_APB1Periph_TIM3
- RCC_APB1Periph_TIM4
- RCC_APB1Periph_TIM6
- RCC_APB1Periph_TIM7
- RCC_APB1Periph_LCD
- RCC_APB1Periph_WWDG
- RCC_APB1Periph_SPI2
- RCC_APB1Periph_USART2
- RCC_APB1Periph_USART3
- RCC_APB1Periph_I2C1
- RCC_APB1Periph_I2C2
- RCC_APB1Periph_USB
- RCC_APB1Periph_PWR
- RCC_APB1Periph_DAC
- RCC_APB1Periph_COMP
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
References assert_param, DISABLE, IS_FUNCTIONAL_STATE, IS_RCC_APB1_PERIPH, and RCC.
Referenced by Stm32I2cBus1Init(), and Stm32I2cBus2Init().
Forces or releases Low Speed APB (APB1) peripheral reset.
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to reset. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2: TIM2 clock
- RCC_APB1Periph_TIM3: TIM3 clock
- RCC_APB1Periph_TIM4: TIM4 clock
- RCC_APB1Periph_TIM5: TIM5 clock
- RCC_APB1Periph_TIM6: TIM6 clock
- RCC_APB1Periph_TIM7: TIM7 clock
- RCC_APB1Periph_TIM12: TIM12 clock
- RCC_APB1Periph_TIM13: TIM13 clock
- RCC_APB1Periph_TIM14: TIM14 clock
- RCC_APB1Periph_WWDG: WWDG clock
- RCC_APB1Periph_SPI2: SPI2 clock
- RCC_APB1Periph_SPI3: SPI3 clock
- RCC_APB1Periph_USART2: USART2 clock
- RCC_APB1Periph_USART3: USART3 clock
- RCC_APB1Periph_UART4: UART4 clock
- RCC_APB1Periph_UART5: UART5 clock
- RCC_APB1Periph_I2C1: I2C1 clock
- RCC_APB1Periph_I2C2: I2C2 clock
- RCC_APB1Periph_I2C3: I2C3 clock
- RCC_APB1Periph_CAN1: CAN1 clock
- RCC_APB1Periph_CAN2: CAN2 clock
- RCC_APB1Periph_PWR: PWR clock
- RCC_APB1Periph_DAC: DAC clock
|
| NewState,: | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to reset. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2
- RCC_APB1Periph_TIM3
- RCC_APB1Periph_TIM4
- RCC_APB1Periph_TIM6
- RCC_APB1Periph_TIM7
- RCC_APB1Periph_LCD
- RCC_APB1Periph_WWDG
- RCC_APB1Periph_SPI2
- RCC_APB1Periph_USART2
- RCC_APB1Periph_USART3
- RCC_APB1Periph_I2C1
- RCC_APB1Periph_I2C2
- RCC_APB1Periph_USB
- RCC_APB1Periph_PWR
- RCC_APB1Periph_DAC
- RCC_APB1Periph_COMP
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
References assert_param, DISABLE, IS_FUNCTIONAL_STATE, IS_RCC_APB1_PERIPH, and RCC.
Referenced by Stm32I2cBus1Init(), Stm32I2cBus2Init(), TIM_DeInit(), and USART_DeInit().
Forces or releases High Speed APB (APB2) peripheral reset.
- Parameters:
-
| RCC_APB2Periph,: | specifies the APB2 peripheral to reset. This parameter can be any combination of the following values:
- RCC_APB2Periph_TIM1: TIM1 clock
- RCC_APB2Periph_TIM8: TIM8 clock
- RCC_APB2Periph_USART1: USART1 clock
- RCC_APB2Periph_USART6: USART6 clock
- RCC_APB2Periph_ADC1: ADC1 clock
- RCC_APB2Periph_ADC2: ADC2 clock
- RCC_APB2Periph_ADC3: ADC3 clock
- RCC_APB2Periph_SDIO: SDIO clock
- RCC_APB2Periph_SPI1: SPI1 clock
- RCC_APB2Periph_SYSCFG: SYSCFG clock
- RCC_APB2Periph_TIM9: TIM9 clock
- RCC_APB2Periph_TIM10: TIM10 clock
- RCC_APB2Periph_TIM11: TIM11 clock
|
| NewState,: | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
- Parameters:
-
| RCC_APB2Periph,: | specifies the APB2 peripheral to reset. This parameter can be any combination of the following values:
- RCC_APB2Periph_SYSCFG
- RCC_APB2Periph_TIM9
- RCC_APB2Periph_TIM10
- RCC_APB2Periph_TIM11
- RCC_APB2Periph_ADC1
- RCC_APB2Periph_SPI1
- RCC_APB2Periph_USART1
|
| NewState,: | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
References assert_param, DISABLE, IS_FUNCTIONAL_STATE, IS_RCC_APB2_PERIPH, IS_RCC_APB2_RESET_PERIPH, and RCC.
Referenced by TIM_DeInit(), and USART_DeInit().
Enables or disables the APB1 peripheral clock during Low Power (Sleep) mode.
Enables or disables the APB1 peripheral clock during SLEEP mode.
- Note:
- Peripheral clock gating in SLEEP mode can be used to further reduce power consumption.
-
After wakeup from SLEEP mode, the peripheral clock is enabled again.
-
By default, all peripheral clocks are enabled during SLEEP mode.
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2: TIM2 clock
- RCC_APB1Periph_TIM3: TIM3 clock
- RCC_APB1Periph_TIM4: TIM4 clock
- RCC_APB1Periph_TIM5: TIM5 clock
- RCC_APB1Periph_TIM6: TIM6 clock
- RCC_APB1Periph_TIM7: TIM7 clock
- RCC_APB1Periph_TIM12: TIM12 clock
- RCC_APB1Periph_TIM13: TIM13 clock
- RCC_APB1Periph_TIM14: TIM14 clock
- RCC_APB1Periph_WWDG: WWDG clock
- RCC_APB1Periph_SPI2: SPI2 clock
- RCC_APB1Periph_SPI3: SPI3 clock
- RCC_APB1Periph_USART2: USART2 clock
- RCC_APB1Periph_USART3: USART3 clock
- RCC_APB1Periph_UART4: UART4 clock
- RCC_APB1Periph_UART5: UART5 clock
- RCC_APB1Periph_I2C1: I2C1 clock
- RCC_APB1Periph_I2C2: I2C2 clock
- RCC_APB1Periph_I2C3: I2C3 clock
- RCC_APB1Periph_CAN1: CAN1 clock
- RCC_APB1Periph_CAN2: CAN2 clock
- RCC_APB1Periph_PWR: PWR clock
- RCC_APB1Periph_DAC: DAC clock
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
- Note:
- - Peripheral clock gating in SLEEP mode can be used to further reduce power consumption.
- After wakeup from SLEEP mode, the peripheral clock is enabled again.
- By default, all peripheral clocks are enabled during SLEEP mode.
- Parameters:
-
| RCC_APB1Periph,: | specifies the APB1 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB1Periph_TIM2
- RCC_APB1Periph_TIM3
- RCC_APB1Periph_TIM4
- RCC_APB1Periph_TIM6
- RCC_APB1Periph_TIM7
- RCC_APB1Periph_LCD
- RCC_APB1Periph_WWDG
- RCC_APB1Periph_SPI2
- RCC_APB1Periph_USART2
- RCC_APB1Periph_USART3
- RCC_APB1Periph_I2C1
- RCC_APB1Periph_I2C2
- RCC_APB1Periph_USB
- RCC_APB1Periph_PWR
- RCC_APB1Periph_DAC
- RCC_APB1Periph_COMP
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
References assert_param, DISABLE, IS_FUNCTIONAL_STATE, IS_RCC_APB1_PERIPH, and RCC.
Enables or disables the APB2 peripheral clock during Low Power (Sleep) mode.
Enables or disables the APB2 peripheral clock during SLEEP mode.
- Note:
- Peripheral clock gating in SLEEP mode can be used to further reduce power consumption.
-
After wakeup from SLEEP mode, the peripheral clock is enabled again.
-
By default, all peripheral clocks are enabled during SLEEP mode.
- Parameters:
-
| RCC_APB2Periph,: | specifies the APB2 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB2Periph_TIM1: TIM1 clock
- RCC_APB2Periph_TIM8: TIM8 clock
- RCC_APB2Periph_USART1: USART1 clock
- RCC_APB2Periph_USART6: USART6 clock
- RCC_APB2Periph_ADC1: ADC1 clock
- RCC_APB2Periph_ADC2: ADC2 clock
- RCC_APB2Periph_ADC3: ADC3 clock
- RCC_APB2Periph_SDIO: SDIO clock
- RCC_APB2Periph_SPI1: SPI1 clock
- RCC_APB2Periph_SYSCFG: SYSCFG clock
- RCC_APB2Periph_TIM9: TIM9 clock
- RCC_APB2Periph_TIM10: TIM10 clock
- RCC_APB2Periph_TIM11: TIM11 clock
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
- Note:
- - Peripheral clock gating in SLEEP mode can be used to further reduce power consumption.
- After wakeup from SLEEP mode, the peripheral clock is enabled again.
- By default, all peripheral clocks are enabled during SLEEP mode.
- Parameters:
-
| RCC_APB2Periph,: | specifies the APB2 peripheral to gates its clock. This parameter can be any combination of the following values:
- RCC_APB2Periph_SYSCFG
- RCC_APB2Periph_TIM9
- RCC_APB2Periph_TIM10
- RCC_APB2Periph_TIM11
- RCC_APB2Periph_ADC1
- RCC_APB2Periph_SPI1
- RCC_APB2Periph_USART1
|
| NewState,: | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
- Return values:
-
References assert_param, DISABLE, IS_FUNCTIONAL_STATE, IS_RCC_APB2_PERIPH, and RCC.