STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
RCC clocks control functions. More...
Functions | |
void | HAL_RCC_MCOConfig (uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv) |
Selects the clock source to output on MCO1 pin(PA8) or on MCO2 pin(PC9). | |
void | HAL_RCC_EnableCSS (void) |
Enables the Clock Security System. | |
void | HAL_RCC_DisableCSS (void) |
Disables the Clock Security System. | |
uint32_t | HAL_RCC_GetSysClockFreq (void) |
Returns the SYSCLK frequency. | |
uint32_t | HAL_RCC_GetHCLKFreq (void) |
Returns the HCLK frequency. | |
uint32_t | HAL_RCC_GetPCLK1Freq (void) |
Returns the PCLK1 frequency. | |
uint32_t | HAL_RCC_GetPCLK2Freq (void) |
Returns the PCLK2 frequency. | |
void | HAL_RCC_GetOscConfig (RCC_OscInitTypeDef *RCC_OscInitStruct) |
Configures the RCC_OscInitStruct according to the internal RCC configuration registers. | |
void | HAL_RCC_GetClockConfig (RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) |
Configures the RCC_ClkInitStruct according to the internal RCC configuration registers. | |
void | HAL_RCC_NMI_IRQHandler (void) |
This function handles the RCC CSS interrupt request. | |
void | HAL_RCC_CSSCallback (void) |
RCC Clock Security System interrupt callback. | |
RCC clocks control functions.
=============================================================================== ##### Peripheral Control functions ##### =============================================================================== [..] This subsection provides a set of functions allowing to control the RCC Clocks frequencies.
void HAL_RCC_MCOConfig | ( | uint32_t | RCC_MCOx, |
uint32_t | RCC_MCOSource, | ||
uint32_t | RCC_MCODiv ) |
#include <stm32f4xx_hal_rcc.h>
Selects the clock source to output on MCO1 pin(PA8) or on MCO2 pin(PC9).
RCC_MCOx | specifies the output direction for the clock source. This parameter can be one of the following values:
|
RCC_MCOSource | specifies the clock source to output. This parameter can be one of the following values:
|
RCC_MCODiv | specifies the MCOx prescaler. This parameter can be one of the following values:
|
None |
Definition at line 775 of file stm32f4xx_hal_rcc.c.
References __MCO1_CLK_ENABLE, __MCO2_CLK_ENABLE, GPIO_InitTypeDef::Alternate, assert_param, GPIO_AF0_MCO, GPIO_MODE_AF_PP, GPIO_NOPULL, GPIO_SPEED_FREQ_VERY_HIGH, HAL_GPIO_Init(), IS_RCC_MCO, IS_RCC_MCO1SOURCE, IS_RCC_MCO2SOURCE, IS_RCC_MCODIV, MCO1_GPIO_PORT, MCO1_PIN, MCO2_GPIO_PORT, MCO2_PIN, GPIO_InitTypeDef::Mode, GPIO_InitTypeDef::Pin, GPIO_InitTypeDef::Pull, RCC_MCO1, and GPIO_InitTypeDef::Speed.
void HAL_RCC_EnableCSS | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Enables the Clock Security System.
None |
Definition at line 841 of file stm32f4xx_hal_rcc.c.
References RCC_CR_CSSON_BB.
void HAL_RCC_DisableCSS | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Disables the Clock Security System.
None |
Definition at line 850 of file stm32f4xx_hal_rcc.c.
References RCC_CR_CSSON_BB.
__weak uint32_t HAL_RCC_GetSysClockFreq | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Returns the SYSCLK frequency.
SYSCLK | frequency |
Definition at line 885 of file stm32f4xx_hal_rcc.c.
References __HAL_RCC_GET_PLL_OSCSOURCE, HSE_VALUE, HSI_VALUE, and RCC_PLLSOURCE_HSI.
Referenced by HAL_RCC_ClockConfig().
uint32_t HAL_RCC_GetHCLKFreq | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Returns the HCLK frequency.
HCLK | frequency |
Definition at line 943 of file stm32f4xx_hal_rcc.c.
Referenced by HAL_ETH_SetMDIOClockRange(), HAL_PCD_IRQHandler(), HAL_RCC_GetPCLK1Freq(), and HAL_RCC_GetPCLK2Freq().
uint32_t HAL_RCC_GetPCLK1Freq | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Returns the PCLK1 frequency.
PCLK1 | frequency |
Definition at line 954 of file stm32f4xx_hal_rcc.c.
References HAL_RCC_GetHCLKFreq().
Referenced by HAL_I2C_Init(), HAL_InitTick(), HAL_SMBUS_Init(), IRDA_SetConfig(), SMARTCARD_SetConfig(), UART_SetConfig(), and USART_SetConfig().
uint32_t HAL_RCC_GetPCLK2Freq | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
Returns the PCLK2 frequency.
PCLK2 | frequency |
Definition at line 966 of file stm32f4xx_hal_rcc.c.
References HAL_RCC_GetHCLKFreq().
Referenced by IRDA_SetConfig(), SMARTCARD_SetConfig(), UART_SetConfig(), and USART_SetConfig().
__weak void HAL_RCC_GetOscConfig | ( | RCC_OscInitTypeDef * | RCC_OscInitStruct | ) |
#include <stm32f4xx_hal_rcc.h>
Configures the RCC_OscInitStruct according to the internal RCC configuration registers.
RCC_OscInitStruct | pointer to an RCC_OscInitTypeDef structure that will be configured. |
None |
Definition at line 979 of file stm32f4xx_hal_rcc.c.
References RCC_OscInitTypeDef::HSEState, RCC_OscInitTypeDef::HSICalibrationValue, RCC_OscInitTypeDef::HSIState, RCC_OscInitTypeDef::LSEState, RCC_OscInitTypeDef::LSIState, RCC_OscInitTypeDef::OscillatorType, RCC_OscInitTypeDef::PLL, RCC_PLLInitTypeDef::PLLM, RCC_PLLInitTypeDef::PLLN, RCC_PLLInitTypeDef::PLLP, RCC_PLLInitTypeDef::PLLQ, RCC_PLLInitTypeDef::PLLSource, RCC_PLLInitTypeDef::PLLState, RCC_HSE_BYPASS, RCC_HSE_OFF, RCC_HSE_ON, RCC_HSI_OFF, RCC_HSI_ON, RCC_LSE_BYPASS, RCC_LSE_OFF, RCC_LSE_ON, RCC_LSI_OFF, RCC_LSI_ON, RCC_OSCILLATORTYPE_HSE, RCC_OSCILLATORTYPE_HSI, RCC_OSCILLATORTYPE_LSE, RCC_OSCILLATORTYPE_LSI, RCC_PLL_OFF, and RCC_PLL_ON.
void HAL_RCC_GetClockConfig | ( | RCC_ClkInitTypeDef * | RCC_ClkInitStruct, |
uint32_t * | pFLatency ) |
#include <stm32f4xx_hal_rcc.h>
Configures the RCC_ClkInitStruct according to the internal RCC configuration registers.
RCC_ClkInitStruct | pointer to an RCC_ClkInitTypeDef structure that will be configured. |
pFLatency | Pointer on the Flash Latency. |
None |
Definition at line 1058 of file stm32f4xx_hal_rcc.c.
References RCC_ClkInitTypeDef::AHBCLKDivider, RCC_ClkInitTypeDef::APB1CLKDivider, RCC_ClkInitTypeDef::APB2CLKDivider, RCC_ClkInitTypeDef::ClockType, RCC_CLOCKTYPE_HCLK, RCC_CLOCKTYPE_PCLK1, RCC_CLOCKTYPE_PCLK2, RCC_CLOCKTYPE_SYSCLK, and RCC_ClkInitTypeDef::SYSCLKSource.
Referenced by HAL_InitTick().
void HAL_RCC_NMI_IRQHandler | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
This function handles the RCC CSS interrupt request.
None |
Definition at line 1084 of file stm32f4xx_hal_rcc.c.
References __HAL_RCC_CLEAR_IT, __HAL_RCC_GET_IT, HAL_RCC_CSSCallback(), and RCC_IT_CSS.
__weak void HAL_RCC_CSSCallback | ( | void | ) |
#include <stm32f4xx_hal_rcc.h>
RCC Clock Security System interrupt callback.
None |
Definition at line 1101 of file stm32f4xx_hal_rcc.c.
Referenced by HAL_RCC_NMI_IRQHandler().