LL RCC Functions

HSE

group RCC_LL_EF_HSE

Functions

void LL_RCC_HSE_EnableCSS ( void )

Enable the Clock Security System.

Reference Manual to LL API cross reference (Register Field Functions)

CR CSSON LL_RCC_HSE_EnableCSS

void LL_RCC_HSE_EnableBypass ( void )

Enable HSE external oscillator (HSE Bypass)

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEBYP LL_RCC_HSE_EnableBypass

void LL_RCC_HSE_ConfigBypass ( uint32_t hse_mode )

Configure HSE external oscillator in bypass.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEBYP LL_RCC_HSE_ConfigBypass

CR HSEEXT LL_RCC_HSE_ConfigBypass

Parameters :

hse_mode – This parameter can be one of the following values:

void LL_RCC_HSE_DisableBypass ( void )

Disable HSE external oscillator (HSE Bypass)

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEBYP LL_RCC_HSE_DisableBypass

uint32_t LL_RCC_HSE_IsBypassed ( void )

Check if HSE is bypassed.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEBYP LL_RCC_HSE_IsBypassed

Return values :

State – of bit (1 or 0).

void LL_RCC_HSE_Enable ( void )

Enable HSE crystal oscillator (HSE ON)

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEON LL_RCC_HSE_Enable

void LL_RCC_HSE_Disable ( void )

Disable HSE crystal oscillator (HSE ON)

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEON LL_RCC_HSE_Disable

uint32_t LL_RCC_HSE_IsEnabled ( void )

Check if HSE oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEON LL_RCC_HSE_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_HSE_IsReady ( void )

Check if HSE oscillator Ready.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSERDY LL_RCC_HSE_IsReady

Return values :

State – of bit (1 or 0).

void LL_RCC_HSE_SetClockMode ( uint32_t hse_mode )

Set external HSE clock mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEEXT LL_RCC_HSE_SetClockMode

Note

This bit can be written only if the HSE oscillator is disabled.

Parameters :

hse_mode – This parameter can be one of the following values:

uint32_t LL_RCC_HSE_GetClockMode ( void )

Get External HSE clock mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSEEXT LL_RCC_HSE_GetClockMode

Return values :

Returned – value can be one of the following values:

HSI

group RCC_LL_EF_HSI

Functions

void LL_RCC_HSI_EnableInStopMode ( void )

Enable HSI even in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSIKERON LL_RCC_HSI_EnableInStopMode

Note

HSI oscillator is forced ON even in Stop mode.

void LL_RCC_HSI_DisableInStopMode ( void )

Disable HSI in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSIKERON LL_RCC_HSI_DisableInStopMode

uint32_t LL_RCC_HSI_IsEnabledInStopMode ( void )

Check if HSI is enabled in stop mode.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSIKERON LL_RCC_HSI_IsEnabledInStopMode

Return values :

State – of bit (1 or 0).

void LL_RCC_HSI_Enable ( void )

Enable HSI oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSION LL_RCC_HSI_Enable

void LL_RCC_HSI_Disable ( void )

Disable HSI oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSION LL_RCC_HSI_Disable

uint32_t LL_RCC_HSI_IsEnabled ( void )

Check if HSI oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSION LL_RCC_HSI_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_HSI_IsReady ( void )

Check if HSI clock is ready.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSIRDY LL_RCC_HSI_IsReady

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_HSI_GetCalibration ( void )

Get HSI Calibration value.

Reference Manual to LL API cross reference (Register Field Functions)

ICSCR3 HSICAL LL_RCC_HSI_GetCalibration

Note

When HSITRIM is written, HSICAL is updated with the sum of HSITRIM and the factory trim value.

Return values :

Between – Min_Data = 0 and Max_Data = 127

void LL_RCC_HSI_SetCalibTrimming ( uint32_t value )

Set HSI Calibration trimming.

Reference Manual to LL API cross reference (Register Field Functions)

ICSCR3 HSITRIM LL_RCC_HSI_SetCalibTrimming

Note

user-programmable trimming value that is added to the HSICAL.

Note

Default value is 64, which, when added to the HSICAL value, trim the HSI to 16 MHz +/- 1 %.

Parameters :

value – Between Min_Data = 0 and Max_Data = 127

uint32_t LL_RCC_HSI_GetCalibTrimming ( void )

Get HSI Calibration trimming.

Reference Manual to LL API cross reference (Register Field Functions)

ICSC3R HSITRIM LL_RCC_HSI_GetCalibTrimming

Return values :

Between – Min_Data = 0 and Max_Data = 127

HSI48

group RCC_LL_EF_HSI48

Functions

void LL_RCC_HSI48_Enable ( void )

Enable HSI48.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSI48ON LL_RCC_HSI48_Enable

void LL_RCC_HSI48_Disable ( void )

Disable HSI48.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSI48ON LL_RCC_HSI48_Disable

uint32_t LL_RCC_HSI48_IsEnabled ( void )

Check if HSI48 oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSI48ON LL_RCC_HSI48_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_HSI48_IsReady ( void )

Check if HSI48 oscillator Ready.

Reference Manual to LL API cross reference (Register Field Functions)

CR HSI48RDY LL_RCC_HSI48_IsReady

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_HSI48_GetCalibration ( void )

Get HSI48 Calibration value.

Reference Manual to LL API cross reference (Register Field Functions)

CRRCR HSI48CAL LL_RCC_HSI48_GetCalibration

Return values :

Between – Min_Data = 0x00 and Max_Data = 0x1FF

LSE

group RCC_LL_EF_LSE

Functions

void LL_RCC_LSE_Enable ( void )

Enable Low Speed External (LSE) crystal.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEON LL_RCC_LSE_Enable

void LL_RCC_LSE_Disable ( void )

Disable Low Speed External (LSE) crystal.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEON LL_RCC_LSE_Disable

void LL_RCC_LSE_EnableBypass ( void )

Enable external clock source (LSE bypass).

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEBYP LL_RCC_LSE_EnableBypass

void LL_RCC_LSE_DisableBypass ( void )

Disable external clock source (LSE bypass).

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEBYP LL_RCC_LSE_DisableBypass

uint32_t LL_RCC_LSE_IsBypassed ( void )

Check if LSE oscillator is bypassed.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR RCC_BDCR_LSEBYP LL_RCC_LSE_IsBypassed

Return values :

State – of bit (1 or 0).

void LL_RCC_LSE_SetDriveCapability ( uint32_t lse_drive )

Set LSE oscillator drive capability.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEDRV LL_RCC_LSE_SetDriveCapability

Note

The oscillator is in Xtal mode when it is not in bypass mode.

Parameters :

lse_drive – This parameter can be one of the following values:

uint32_t LL_RCC_LSE_GetDriveCapability ( void )

Get LSE oscillator drive capability.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEDRV LL_RCC_LSE_GetDriveCapability

Return values :

Returned – value can be one of the following values:

void LL_RCC_LSE_EnableCSS ( void )

Enable Clock security system on LSE.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSECSSON LL_RCC_LSE_EnableCSS

void LL_RCC_LSE_DisableCSS ( void )

Disable Clock security system on LSE.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSECSSON LL_RCC_LSE_DisableCSS

Note

Clock security system can be disabled only after a LSE failure detection. In that case it must be disabled by software.

uint32_t LL_RCC_LSE_IsEnabled ( void )

Check if LSE oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEON LL_RCC_LSE_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_LSE_IsReady ( void )

Check if LSE oscillator Ready.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSERDY LL_RCC_LSE_IsReady

Return values :

State – of bit (1 or 0).

void LL_RCC_LSE_EnablePropagation ( void )

Enable LSE oscillator propagation for system clock.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSESYSEN LL_RCC_LSE_EnablePropagation

void LL_RCC_LSE_DisablePropagation ( void )

Disable LSE oscillator propagation for system clock.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSESYSEN LL_RCC_LSE_DisablePropagation

uint32_t LL_RCC_LSE_IsPropagationEnabled ( void )

Check if LSE oscillator propagation is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR RCC_BDCR_LSESYSEN LL_RCC_LSE_IsPropagationEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_LSE_IsPropagationReady ( void )

Check if LSE oscillator propagation for system clock Ready.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSESYSRDY LL_RCC_LSE_IsPropagationReady

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_LSE_IsCSSDetected ( void )

Check if CSS on LSE failure Detection.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSECSSD LL_RCC_LSE_IsCSSDetected

Return values :

State – of bit (1 or 0).

void LL_RCC_LSE_EnableGlitchFilter ( void )

Enable LSE clock glitch filter.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEGFON LL_RCC_LSE_EnableGlitchFilter

Note

The glitches on LSE can be filtred by setting the LSEGFON.

Note

LSEGFON must be written when the LSE is disabled (LSEON = 0 and LSERDY = 0).

void LL_RCC_LSE_DisableGlitchFilter ( void )

Disable LSE clock glitch filter.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEGFON LL_RCC_LSE_DisableGlitchFilter

Note

LSEGFON must be written when the LSE is disabled (LSEON = 0 and LSERDY = 0).

uint32_t LL_RCC_LSE_IsGlitchFilterEnabled ( void )

Check if LSE clock glitch filter is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSEGFON LL_RCC_LSE_IsGlitchFilterEnabled

Return values :

State – of bit (1 or 0).

LSI

group RCC_LL_EF_LSI

Functions

void LL_RCC_LSI_Enable ( void )

Enable LSI Oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSION LL_RCC_LSI_Enable

void LL_RCC_LSI_Disable ( void )

Disable LSI Oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSION LL_RCC_LSI_Disable

uint32_t LL_RCC_LSI_IsEnabled ( void )

Check if LSI oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSION LL_RCC_LSI_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_LSI_IsReady ( void )

Check if LSI is Ready.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSIRDY LL_RCC_LSI_IsReady

Return values :

State – of bit (1 or 0).

void LL_RCC_LSI_SetPrescaler ( uint32_t lsi_prescaler )

Set LSI prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSIPREDIV LL_RCC_LSI_SetPrescaler

Parameters :

lsi_prescaler – This parameter can be one of the following values:

uint32_t LL_RCC_LSI_GetPrescaler ( void )

Get LSI prescaler.

Reference Manual to LL API cross reference (Register Field Functions)

BDCR LSIPREDIV LL_RCC_LSI_GetPrescaler

Return values :

Returned – value can be one of the following values:

SHSI

group RCC_LL_EF_SHSI

Functions

void LL_RCC_SHSI_Enable ( void )

Enable SHSI oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

CR SHSION LL_RCC_SHSI_Enable

void LL_RCC_SHSI_Disable ( void )

Disable SHSI oscillator.

Reference Manual to LL API cross reference (Register Field Functions)

CR SHSION LL_RCC_SHSI_Disable

uint32_t LL_RCC_SHSI_IsEnabled ( void )

Check if SHSI oscillator is enabled.

Reference Manual to LL API cross reference (Register Field Functions)

CR SHSION LL_RCC_SHSI_IsEnabled

Return values :

State – of bit (1 or 0).

uint32_t LL_RCC_SHSI_IsReady ( void )

Check if SHSI oscillator Ready.

Reference Manual to LL API cross reference (Register Field Functions)

CR SHSIRDY LL_RCC_SHSI_IsReady

Return values :

State – of bit (1 or 0).