STM8L15x Standard Peripherals Drivers
|
Peripheral clocks configuration functions. More...
Functions | |
void | CLK_BEEPClockConfig (CLK_BEEPCLKSource_TypeDef CLK_BEEPCLKSource) |
Configures the BEEP clock (BEEPCLK). | |
void | CLK_PeripheralClockConfig (CLK_Peripheral_TypeDef CLK_Peripheral, FunctionalState NewState) |
Enables or disables the specified peripheral clock. | |
void | CLK_RTCClockConfig (CLK_RTCCLKSource_TypeDef CLK_RTCCLKSource, CLK_RTCCLKDiv_TypeDef CLK_RTCCLKDiv) |
Configures the RTC clock (RTCCLK). |
Detailed Description
Peripheral clocks configuration functions.
=============================================================================== Peripheral clocks configuration functions =============================================================================== This section provides functions allowing to configure the Peripheral clocks. 1. The RTC clock which is derived from the LSI, LSE, HSI or HSE clock divided by 1 to 64. 2. The BEEP clock which is derived from the LSI or LSE clocks. 3. After restart from Reset or wakeup from HALT, all peripherals are off Before to start using a peripheral you have to enable its interface clock. You can do this using CLK_AHBPeriphClockCmd() , CLK_APB2PeriphClockCmd() and CLK_APB1PeriphClockCmd() functions. 4. To reset the peripherals configuration (to the default state after device reset) you can use CLK_PeripheralClockConfig() function.
Function Documentation
void CLK_BEEPClockConfig | ( | CLK_BEEPCLKSource_TypeDef | CLK_BEEPCLKSource | ) |
Configures the BEEP clock (BEEPCLK).
Definition at line 629 of file stm8l15x_clk.c.
References CLK, and IS_CLK_CLOCK_BEEP.
void CLK_PeripheralClockConfig | ( | CLK_Peripheral_TypeDef | CLK_Peripheral, |
FunctionalState | NewState | ||
) |
Enables or disables the specified 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.
Definition at line 671 of file stm8l15x_clk.c.
References CLK, DISABLE, IS_CLK_PERIPHERAL, and IS_FUNCTIONAL_STATE.
void CLK_RTCClockConfig | ( | CLK_RTCCLKSource_TypeDef | CLK_RTCCLKSource, |
CLK_RTCCLKDiv_TypeDef | CLK_RTCCLKDiv | ||
) |
Configures the RTC clock (RTCCLK).
- Note:
- If the LSE or LSI is used as RTC clock source, the RTC continues to work in HALT and Active HALT modes, and can be used as wakeup source. However, when the HSE clock is used as RTC clock source.
- The maximum input clock frequency for RTC is 1MHz (when using HSE/HSI as RTC clock source).
Definition at line 610 of file stm8l15x_clk.c.
References CLK, IS_CLK_CLOCK_RTC, and IS_CLK_CLOCK_RTC_DIV.