MG32F10x Standard Peripherals Firmware Library

函数
RCC_Private_Functions
MG32F10x_StdPeriph_Driver » RCC

## 函数
void | RCC_PLLSourceConfig (uint32_t RCC_PLLSource, FunctionalState NewState)
| Configures the PLL clock source. 更多...
void | RCC_MAINCLKConfig (uint32_t RCC_MAINCLKSource)
| Configures the main clock (MAINCLK). 更多...
void | RCC_USBCLKConfig (uint32_t RCC_USBCLKSource, FunctionalState NewState)
| Configures the USB clock (USBCLK). 更多...
void | RCC_AHBCLKConfig (uint32_t RCC_MAINCLK)
| Configures the AHB clock (AHBCLK). 更多...
void | RCC_APB1CLKConfig (uint32_t RCC_MAINCLK, FunctionalState NewState)
| Configures the APB1 clock (APB1CLK). 更多...
void | RCC_APB2CLKConfig (uint32_t RCC_MAINCLK, FunctionalState NewState)
| Configures the APB2 clock (APB2CLK). 更多...
void | RCC_MCLKConfig (uint32_t RCC_MCLKSource, FunctionalState NewState)
| Configures the I2S MCLK clock (MCLK). 更多...
void | RCC_I2SCLKConfig (uint32_t RCC_MCLK, FunctionalState NewState)
| Configures the I2S SCLK clock (I2SCLK). 更多...
void | RCC_I2SCLKResetCmd (FunctionalState NewState)
| Forces or releases the I2S SCLK clock domain reset. 更多...
void | RCC_RNGCLKCmd (FunctionalState NewState)
| Enables or disables the RNG clock (RNGCLK). 更多...
void | RCC_IWDGCLKCmd (FunctionalState NewState)
| Enables or disables the IWDG clock (IWDGCLK). 更多...
void | RCC_DCSSCLKCmd (FunctionalState NewState)
| Enables or disables the DCSS clock. 更多...
void | RCC_SPIS1CLKCmd (FunctionalState NewState)
| Enables or disables the SPIS1 clock (SPIS1CLK). 更多...
void | RCC_SPIS2CLKCmd (FunctionalState NewState)
| Enables or disables the SPIS2 clock (SPIS2CLK). 更多...
void | RCC_USBFIFOCLKConfig (uint32_t RCC_USBFIFOCLKSource)
| Configures the USB FIFO clock (USBFIFOCLK). 更多...
void | RCC_USBFIFOCLKCmd (FunctionalState NewState)
| Enables or disables the USB FIFO clock (USBFIFOCLK). 更多...
void | RCC_MCOConfig (uint32_t RCC_MCO)
| Selects the clock source to output on MCO pin. 更多...
void | RCC_GetClocksFreq (RCC_ClocksTypeDef *RCC_Clocks)
| Returns the frequencies of different on chip clocks. 更多...
void | RCC_AHBPeriphClockCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState)
| Enables or disables the AHB peripheral clock. 更多...
void | RCC_APB1PeriphClockCmd (uint32_t RCC_APB1Periph, FunctionalState NewState)
| Enables or disables the APB1 peripheral clock. 更多...
void | RCC_APB2PeriphClockCmd (uint32_t RCC_APB2Periph, FunctionalState NewState)
| Enables or disables the APB2 peripheral clock. 更多...
void | RCC_AHBPeriphResetCmd (uint32_t RCC_AHBPeriph, FunctionalState NewState)
| Forces or releases AHB peripheral reset. 更多...
void | RCC_APB1PeriphResetCmd (uint32_t RCC_APB1Periph, FunctionalState NewState)
| Forces or releases APB1 peripheral reset. 更多...
void | RCC_APB2PeriphResetCmd (uint32_t RCC_APB2Periph, FunctionalState NewState)
| Forces or releases APB2 peripheral reset. 更多...
void | RCC_BackupResetCmd (FunctionalState NewState)
| Forces or releases the Backup domain reset. 更多...
FlagStatus | RCC_GetResetFlagStatus (uint32_t RCC_RSTFLAG)
| Checks whether the specified RCC reset flag is set or not. 更多...
void | RCC_ClearResetFlags (void)
| Clears the RCC reset flags. 更多...

## 详细描述

## 函数说明

## ◆ RCC_AHBCLKConfig()

void RCC_AHBCLKConfig | ( | uint32_t | RCC_MAINCLK | ) |

Configures the AHB clock (AHBCLK).

参数

  RCC_MAINCLK | defines the AHB clock divider. This clock is derived from the main clock (MAINCLK). This parameter can be RCC_MAINCLK_Divx where x:[1, 64]

返回
  None

## ◆ RCC_AHBPeriphClockCmd()

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: RCC_AHBPeriph_IWDG RCC_AHBPeriph_USB RCC_AHBPeriph_ISO RCC_AHBPeriph_FLASH RCC_AHBPeriph_CACHE RCC_AHBPeriph_SYS RCC_AHBPeriph_DMAC1Bridge RCC_AHBPeriph_DMAC2Bridge RCC_AHBPeriph_CRC_SFM RCC_AHBPeriph_BKP
  NewState | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_AHBPeriphResetCmd()

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: RCC_AHBPeriph_USB RCC_AHBPeriph_ISO RCC_AHBPeriph_FLASH RCC_AHBPeriph_CACHE RCC_AHBPeriph_SYS RCC_AHBPeriph_CRC_SFM
  NewState | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB1CLKConfig()

void RCC_APB1CLKConfig | ( | uint32_t | RCC_MAINCLK,
|  | FunctionalState | NewState
| ) |  |

Configures the APB1 clock (APB1CLK).

参数

  RCC_MAINCLK | defines the APB1 clock divider. This clock is derived from the main clock (MAINCLK). This parameter can be RCC_MAINCLK_Divx where x:[1, 64]
  NewState | new state of the APB1 clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB1PeriphClockCmd()

void RCC_APB1PeriphClockCmd | ( | uint32_t | RCC_APB1Periph,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the APB1 peripheral clock.

参数

  RCC_APB1Periph | specifies the APB1 peripheral to gates its clock. This parameter can be any combination of the following values: RCC_APB1Periph_DMAC1 RCC_APB1Periph_TIM1 RCC_APB1Periph_TIM2 RCC_APB1Periph_TIM3 RCC_APB1Periph_TIM4 RCC_APB1Periph_GPIOA RCC_APB1Periph_GPIOB RCC_APB1Periph_GPIOC RCC_APB1Periph_GPIOD RCC_APB1Periph_EXTI RCC_APB1Periph_AFIO RCC_APB1Periph_ADC RCC_APB1Periph_QSPI RCC_APB1Periph_SPIS1 RCC_APB1Periph_UART1 RCC_APB1Periph_BMX1
  NewState | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB1PeriphResetCmd()

void RCC_APB1PeriphResetCmd | ( | uint32_t | RCC_APB1Periph,
|  | FunctionalState | NewState
| ) |  |

Forces or releases APB1 peripheral reset.

参数

  RCC_APB1Periph | specifies the APB1 peripheral to reset. This parameter can be any combination of the following values: RCC_APB1Periph_DMAC1 RCC_APB1Periph_TIM1 RCC_APB1Periph_TIM2 RCC_APB1Periph_TIM3 RCC_APB1Periph_TIM4 RCC_APB1Periph_GPIOA RCC_APB1Periph_GPIOB RCC_APB1Periph_GPIOC RCC_APB1Periph_GPIOD RCC_APB1Periph_EXTI RCC_APB1Periph_AFIO RCC_APB1Periph_ADC RCC_APB1Periph_QSPI RCC_APB1Periph_SPIS1 RCC_APB1Periph_UART1 RCC_APB1Periph_BMX1
  NewState | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB2CLKConfig()

void RCC_APB2CLKConfig | ( | uint32_t | RCC_MAINCLK,
|  | FunctionalState | NewState
| ) |  |

Configures the APB2 clock (APB2CLK).

参数

  RCC_MAINCLK | defines the APB2 clock divider. This clock is derived from the main clock (MAINCLK). This parameter can be RCC_MAINCLK_Divx where x:[1, 64]
  NewState | new state of the APB2 clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB2PeriphClockCmd()

void RCC_APB2PeriphClockCmd | ( | uint32_t | RCC_APB2Periph,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the APB2 peripheral clock.

参数

  RCC_APB2Periph | specifies the APB2 peripheral to gates its clock. This parameter can be any combination of the following values: RCC_APB2Periph_DMAC2 RCC_APB2Periph_WWDG RCC_APB2Periph_UART2 RCC_APB2Periph_UART3 RCC_APB2Periph_SPIM2 RCC_APB2Periph_SPIS2 RCC_APB2Periph_I2S RCC_APB2Periph_I2C1 RCC_APB2Periph_I2C2 RCC_APB2Periph_RNG RCC_APB2Periph_LED RCC_APB2Periph_BMX2
  NewState | new state of the specified peripheral clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_APB2PeriphResetCmd()

void RCC_APB2PeriphResetCmd | ( | uint32_t | RCC_APB2Periph,
|  | FunctionalState | NewState
| ) |  |

Forces or releases APB2 peripheral reset.

参数

  RCC_APB2Periph | specifies the APB2 peripheral to reset. This parameter can be any combination of the following values: RCC_APB2Periph_DMAC2 RCC_APB2Periph_WWDG RCC_APB2Periph_UART2 RCC_APB2Periph_UART3 RCC_APB2Periph_SPIM2 RCC_APB2Periph_SPIS2 RCC_APB2Periph_I2S RCC_APB2Periph_I2C1 RCC_APB2Periph_I2C2 RCC_APB2Periph_RNG RCC_APB2Periph_LED RCC_APB2Periph_BMX2
  NewState | new state of the specified peripheral reset. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_BackupResetCmd()

void RCC_BackupResetCmd | ( | FunctionalState | NewState | ) |

Forces or releases the Backup domain reset.

参数

  NewState | new state of the Backup domain reset. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_ClearResetFlags()

void RCC_ClearResetFlags | ( | void |  | ) |

Clears the RCC reset flags.

注解
  The reset flags are RCC_RSTFLAG_LPWRRST, RCC_RSTFLAG_WWDGRST, RCC_RSTFLAG_IWDGRST RCC_RSTFLAG_SFTRST, RCC_RSTFLAG_PORRST, RCC_RSTFLAG_PINRST

参数

  None |

返回
  None.

## ◆ RCC_DCSSCLKCmd()

void RCC_DCSSCLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the DCSS clock.

参数

  NewState | new state of the DCSS clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_GetClocksFreq()

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

## ◆ RCC_GetResetFlagStatus()

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: RCC_RSTFLAG_LPWRRST: Low Power reset RCC_RSTFLAG_WWDGRST: Window Watchdog reset RCC_RSTFLAG_IWDGRST: Independent Watchdog reset RCC_RSTFLAG_SFTRST: Software reset RCC_RSTFLAG_PORRST: POR/PDR reset RCC_RSTFLAG_PINRST: Pin reset

返回
  The new state of RCC_RSTFLAG (SET or RESET).

## ◆ RCC_I2SCLKConfig()

void RCC_I2SCLKConfig | ( | uint32_t | RCC_MCLK,
|  | FunctionalState | NewState
| ) |  |

Configures the I2S SCLK clock (I2SCLK).

参数

  RCC_MCLK | defines the I2S SCLK clock divider. This clock is derived from the MCLK clock (MCLK). This parameter can be RCC_MCLK_Divx where x:[1, 512]
  NewState | new state of the I2S SCLK clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_I2SCLKResetCmd()

void RCC_I2SCLKResetCmd | ( | FunctionalState | NewState | ) |

Forces or releases the I2S SCLK clock domain reset.

参数

  NewState | new state of the I2S SCLK clock domain reset. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_IWDGCLKCmd()

void RCC_IWDGCLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the IWDG clock (IWDGCLK).

注解
  This switch is invalid if the IWDG is running.

参数

  NewState | new state of the IWDG clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_MAINCLKConfig()

void RCC_MAINCLKConfig | ( | uint32_t | RCC_MAINCLKSource | ) |

Configures the main clock (MAINCLK).

参数

  RCC_MAINCLKSource | specifies the clock source used as main clock. This parameter can be one of the following values: RCC_MAINCLKSource_MHSI: MHSI selected as main clock RCC_MAINCLKSource_FHSI: FHSI selected as main clock RCC_MAINCLKSource_PLLCLK: PLL selected as main clock RCC_MAINCLKSource_HSE: HSE selected as main clock

返回
  None

## ◆ RCC_MCLKConfig()

void RCC_MCLKConfig | ( | uint32_t | RCC_MCLKSource,
|  | FunctionalState | NewState
| ) |  |

Configures the I2S MCLK clock (MCLK).

参数

  RCC_MCLKSource | specifies the I2S MCLK clock source.. This parameter can be RCC_MCLKSource_MAINCLK_Divx or RCC_MCLKSource_FHSI_Divx where x:[1, 64]
  NewState | new state of the I2S MCLK clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_MCOConfig()

void RCC_MCOConfig | ( | uint32_t | RCC_MCO | ) |

Selects the clock source to output on MCO pin.

参数

  RCC_MCO | specifies the clock source to output. This parameter can be one of the following values: RCC_MCO_NoClock: No clock selected RCC_MCO_AHBCLK: AHB clock selected RCC_MCO_HSE: HSE oscillator clock selected RCC_MCO_MHSI: MHSI oscillator clock selected RCC_MCO_PLLCLK_Div2: PLL clock divided by 2 selected RCC_MCO_MCLK: I2S MCLK clock selected

返回
  None

## ◆ RCC_PLLSourceConfig()

void RCC_PLLSourceConfig | ( | uint32_t | RCC_PLLSource,
|  | FunctionalState | NewState
| ) |  |

Configures the PLL clock source.

参数

  RCC_PLLSource | specifies the PLL entry clock source. This parameter can be RCC_PLLSource_HSE_Divx or RCC_PLLSource_MHSI_Divx where x:[1, 16]
  NewState | new state of the PLL source clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_RNGCLKCmd()

void RCC_RNGCLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the RNG clock (RNGCLK).

参数

  NewState | new state of the RNG clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_SPIS1CLKCmd()

void RCC_SPIS1CLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the SPIS1 clock (SPIS1CLK).

参数

  NewState | new state of the SPIS1 clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_SPIS2CLKCmd()

void RCC_SPIS2CLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the SPIS2 clock (SPIS2CLK).

参数

  NewState | new state of the SPIS2 clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_USBCLKConfig()

void RCC_USBCLKConfig | ( | uint32_t | RCC_USBCLKSource,
|  | FunctionalState | NewState
| ) |  |

Configures the USB clock (USBCLK).

参数

  RCC_USBCLKSource | specifies the USB clock source.. This parameter can be one of the following values: RCC_USBCLKSource_MAINCLK_Div1: main clock selected as USB clock source RCC_USBCLKSource_MAINCLK_1Div5: main clock divided by 1.5 selected as USB clock source RCC_USBCLKSource_MAINCLK_Div2: main clock divided by 2 selected as USB clock source RCC_USBCLKSource_MAINCLK_Div3: main clock divided by 3 selected as USB clock source
  NewState | new state of the USB clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_USBFIFOCLKCmd()

void RCC_USBFIFOCLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the USB FIFO clock (USBFIFOCLK).

参数

  NewState | new state of the USB FIFO clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ RCC_USBFIFOCLKConfig()

void RCC_USBFIFOCLKConfig | ( | uint32_t | RCC_USBFIFOCLKSource | ) |

Configures the USB FIFO clock (USBFIFOCLK).

参数

  RCC_USBFIFOCLKSource | specifies the USB FIFO clock source. This parameter can be one of the following values: RCC_USBFIFOCLKSource_AHBCLK: AHB clock selected as USB FIFO clock source RCC_USBFIFOCLKSource_USBCLK: USB clock selected as USB FIFO clock source

返回
  None