STM32F103xB HAL User Manual
Defines
Peripheral Configuration
RCCEx Exported Macros

Macros to configure clock source of different peripherals. More...

Defines

#define __HAL_RCC_USB_CONFIG(__USBCLKSOURCE__)   MODIFY_REG(RCC->CFGR, RCC_CFGR_USBPRE, (uint32_t)(__USBCLKSOURCE__))
 Macro to configure the USB clock.
#define __HAL_RCC_GET_USB_SOURCE()   ((uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_USBPRE)))
 Macro to get the USB clock (USBCLK).
#define __HAL_RCC_ADC_CONFIG(__ADCCLKSOURCE__)   MODIFY_REG(RCC->CFGR, RCC_CFGR_ADCPRE, (uint32_t)(__ADCCLKSOURCE__))
 Macro to configure the ADCx clock (x=1 to 3 depending on devices).
#define __HAL_RCC_GET_ADC_SOURCE()   ((uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_ADCPRE)))
 Macro to get the ADC clock (ADCxCLK, x=1 to 3 depending on devices).

Detailed Description

Macros to configure clock source of different peripherals.


Define Documentation

#define __HAL_RCC_ADC_CONFIG (   __ADCCLKSOURCE__)    MODIFY_REG(RCC->CFGR, RCC_CFGR_ADCPRE, (uint32_t)(__ADCCLKSOURCE__))

Macro to configure the ADCx clock (x=1 to 3 depending on devices).

Parameters:
__ADCCLKSOURCE__specifies the ADC clock source. This parameter can be one of the following values:

Definition at line 1721 of file stm32f1xx_hal_rcc_ex.h.

Referenced by HAL_RCCEx_PeriphCLKConfig().

#define __HAL_RCC_GET_ADC_SOURCE ( )    ((uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_ADCPRE)))

Macro to get the ADC clock (ADCxCLK, x=1 to 3 depending on devices).

Return values:
Theclock source can be one of the following values:

Definition at line 1731 of file stm32f1xx_hal_rcc_ex.h.

Referenced by HAL_RCCEx_GetPeriphCLKConfig(), and HAL_RCCEx_GetPeriphCLKFreq().

#define __HAL_RCC_GET_USB_SOURCE ( )    ((uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_USBPRE)))

Macro to get the USB clock (USBCLK).

Return values:
Theclock source can be one of the following values:

Definition at line 1689 of file stm32f1xx_hal_rcc_ex.h.

Referenced by HAL_RCCEx_GetPeriphCLKConfig(), and HAL_RCCEx_GetPeriphCLKFreq().

#define __HAL_RCC_USB_CONFIG (   __USBCLKSOURCE__)    MODIFY_REG(RCC->CFGR, RCC_CFGR_USBPRE, (uint32_t)(__USBCLKSOURCE__))

Macro to configure the USB clock.

Parameters:
__USBCLKSOURCE__specifies the USB clock source. This parameter can be one of the following values:

Definition at line 1681 of file stm32f1xx_hal_rcc_ex.h.

Referenced by HAL_RCCEx_PeriphCLKConfig().