MG32L003 Standard Peripherals Firmware Library
|
RCC driver modules. More...
Modules | |
RCC_Exported_Constants | |
RCC_Private_Functions | |
Data Structures | |
struct | RCC_ClocksTypeDef |
Functions | |
void | RCC_DeInit (void) |
Resets the RCC clock configuration to the default reset state. More... | |
void | RCC_HSIConfig (uint32_t HSI_Value, FunctionalState NewState) |
Configures the Internal High Speed oscillator (HSI). More... | |
void | RCC_LSIConfig (uint32_t LSI_Value, uint32_t LSI_StartUPTime, FunctionalState NewState) |
Configures the Internal low Speed oscillator (LSI). More... | |
void | RCC_HSEConfig (uint32_t RCC_HSE) |
Configures the External High Speed oscillator (HSE). More... | |
void | RCC_LSEConfig (uint32_t RCC_LSE) |
Configures the External Low Speed oscillator (LSE). More... | |
void | RCC_HSEDriveCurrentConfig (uint32_t Current) |
Configures the drive current of High Speed oscillator (HSE). More... | |
void | RCC_HSEStartTimeConfig (uint32_t Time) |
Configures the start time of High Speed oscillator (HSE). More... | |
void | RCC_LSEDriveCurrentConfig (uint32_t Current) |
Configures the drive current of Low Speed oscillator (LSE). More... | |
void | RCC_LSEStartTimeConfig (uint32_t Time) |
Configures the start time of Low Speed oscillator (LSE). More... | |
void | RCC_SYSCLKConfig (uint32_t RCC_SYSCLKSource) |
Configures the SYS Clock (SYSCLK). More... | |
void | RCC_AHBCLKConfig (uint32_t RCC_AHBCLKDiv) |
Configures the AHB clock (AHBCLK). More... | |
void | RCC_APBCLKConfig (uint32_t RCC_APBCLKDiv) |
Configures the APB clock (APBCLK). More... | |
void | RCC_MCOConfig (uint32_t RCC_MCOSource, uint32_t RCC_MCOHCLKDiv) |
Selects the clock source to output on MCO pin. More... | |
void | RCC_MCOCmd (FunctionalState NewState) |
Enable or Disable the MCO Clock output. More... | |
void | RCC_GetClocksFreq (RCC_ClocksTypeDef *RCC_Clocks) |
Returns the frequencies of different on chip clocks. More... | |
void | RCC_AHBPeriphClockCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState) |
Enables or disables the AHB peripheral clock. More... | |
void | RCC_APBPeriphClockCmd (uint32_t RCC_APBPeriph, FunctionalState NewState) |
Enables or disables the APB peripheral clock. More... | |
void | RCC_AHBPeriphResetCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState) |
Forces or releases AHB peripheral reset. More... | |
void | RCC_APBPeriphResetCmd (uint32_t RCC_APBPeriph, FunctionalState NewState) |
Forces or releases APB peripheral reset. More... | |
void | RCC_RTCPeriphResetCmd (FunctionalState NewState) |
Forces or releases RTC peripheral reset. More... | |
FlagStatus | RCC_GetResetFlagStatus (uint32_t RCC_RSTFLAG) |
Checks whether the specified RCC reset flag is set or not. More... | |
void | RCC_ClearResetFlags (uint32_t RCC_RSTFLAG) |
Clear the specified RCC reset flag. More... | |
RCC driver modules.
#define IS_HSI_VALUE | ( | VALUE | ) |
#define IS_LSI_VALUE | ( | VALUE | ) |
#define IS_RCC_HSE | ( | HSE | ) |
#define IS_RCC_LSE | ( | LSE | ) |
#define IS_RCC_LSI_STARTUP | ( | TIME | ) |
#define IS_RCC_MCO_SOURCE | ( | SOURCE | ) |
#define IS_RCC_RESET_FLAG | ( | FLAG | ) |
#define IS_RCC_SYSCLK_SOURCE | ( | SOURCE | ) |
void RCC_AHBCLKConfig | ( | uint32_t | RCC_AHBCLKDiv | ) |
Configures the AHB clock (AHBCLK).
RCC_AHBCLKDiv | defines the AHB clock divider. This clock is derived from the system clock (SYSCLK). This parameter can be a value of 1-510, The allowed values are an even number from 2 to 510 and 1. |
None |
void RCC_AHBPeriphClockCmd | ( | uint32_t | RCC_AHBPeriph, |
FunctionalState | NewState | ||
) |
Enables or disables the AHB peripheral clock.
RCC_AHBPeriph | specifies the AHB peripheral to gates its clock. This parameter can be any combination of the following values:
|
NewState | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_AHBPeriphResetCmd | ( | uint32_t | RCC_AHBPeriph, |
FunctionalState | NewState | ||
) |
Forces or releases AHB peripheral reset.
RCC_AHBPeriph | specifies the AHB peripheral to reset. This parameter can be any combination of the following values:
|
NewState | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_APBCLKConfig | ( | uint32_t | RCC_APBCLKDiv | ) |
Configures the APB clock (APBCLK).
RCC_APBCLKDiv | defines the APB clock divider. This clock is derived from the AHB clock (HCLK). This parameter can be a value of 1-510, The allowed values are an even number from 2 to 510 and 1. |
None |
void RCC_APBPeriphClockCmd | ( | uint32_t | RCC_APBPeriph, |
FunctionalState | NewState | ||
) |
Enables or disables the APB peripheral clock.
RCC_APBPeriph | specifies the APB peripheral to gates its clock. This parameter can be any combination of the following values:
|
NewState | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_APBPeriphResetCmd | ( | uint32_t | RCC_APBPeriph, |
FunctionalState | NewState | ||
) |
Forces or releases APB peripheral reset.
RCC_APBPeriph | specifies the APB peripheral to reset. This parameter can be any combination of the following values:
|
NewState | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_ClearResetFlags | ( | uint32_t | RCC_RSTFLAG | ) |
Clear the specified RCC reset flag.
RCC_RSTFLAG | specifies the flag to check. This parameter can be one of the following values:
|
None. |
void RCC_DeInit | ( | void | ) |
Resets the RCC clock configuration to the default reset state.
None |
void RCC_GetClocksFreq | ( | RCC_ClocksTypeDef * | RCC_Clocks | ) |
Returns the frequencies of different on chip clocks.
RCC_Clocks | pointer to a RCC_ClocksTypeDef structure which will hold the clocks frequencies. |
None |
FlagStatus RCC_GetResetFlagStatus | ( | uint32_t | RCC_RSTFLAG | ) |
Checks whether the specified RCC reset flag is set or not.
RCC_RSTFLAG | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of RCC_RSTFLAG (SET or RESET). |
void RCC_HSEConfig | ( | uint32_t | RCC_HSE | ) |
Configures the External High Speed oscillator (HSE).
RCC_HSE | Specifies the new state of the HSE. This parameter can be one of the following values:
|
None |
void RCC_HSEDriveCurrentConfig | ( | uint32_t | Current | ) |
Configures the drive current of High Speed oscillator (HSE).
Current | specifies the drive current. |
None |
void RCC_HSEStartTimeConfig | ( | uint32_t | Time | ) |
Configures the start time of High Speed oscillator (HSE).
Time | specifies the start time. |
None |
void RCC_HSIConfig | ( | const uint32_t | HSI_Value, |
FunctionalState | NewState | ||
) |
Configures the Internal High Speed oscillator (HSI).
HSI_Value | The HSI frequency value. This parameter can be one of the following values: |
NewState | new state of the HSI. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_LSEConfig | ( | uint32_t | RCC_LSE | ) |
Configures the External Low Speed oscillator (LSE).
RCC_LSE | Specifies the new state of the LSE. This parameter can be one of the following values:
|
None |
void RCC_LSEDriveCurrentConfig | ( | uint32_t | Current | ) |
Configures the drive current of Low Speed oscillator (LSE).
Current | specifies the drive current. |
None |
void RCC_LSEStartTimeConfig | ( | uint32_t | Time | ) |
Configures the start time of Low Speed oscillator (LSE).
Time | specifies the start time. |
None |
void RCC_LSIConfig | ( | uint32_t | LSI_Value, |
uint32_t | LSI_StartUPTime, | ||
FunctionalState | NewState | ||
) |
Configures the Internal low Speed oscillator (LSI).
LSI_Value | The LSI frequency value. This parameter can be one of the following values: |
LSI_StartUPTime | The LSI startup time. This parameter can be one of the following values: |
NewState | new state of the LSI. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_MCOCmd | ( | FunctionalState | NewState | ) |
Enable or Disable the MCO Clock output.
NewState | new state of the MCO. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_MCOConfig | ( | uint32_t | RCC_MCOSource, |
uint32_t | RCC_MCOHCLKDiv | ||
) |
Selects the clock source to output on MCO pin.
RCC_MCOSource | specifies the clock source to output. This parameter can be one of the following values:
|
RCC_MCOHCLKDiv | specifies the MCO DIV. This parameter can be a value of 1-510, The allowed values are an even number from 2 to 510 and 1. |
None |
void RCC_RTCPeriphResetCmd | ( | FunctionalState | NewState | ) |
Forces or releases RTC peripheral reset.
NewState | new state of the RTC peripheral reset. This parameter can be: ENABLE or DISABLE. |
None |
void RCC_SYSCLKConfig | ( | uint32_t | RCC_SYSCLKSource | ) |
Configures the SYS Clock (SYSCLK).
RCC_SYSCLKSource | specifies the clock source used as system clock. This parameter can be one of the following values:
|
None |