TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Configuration

Functions

__STATIC_INLINE void LL_CRS_EnableFreqErrorCounter (void)
 Enable Frequency error counter.
__STATIC_INLINE void LL_CRS_DisableFreqErrorCounter (void)
 Disable Frequency error counter CR CEN LL_CRS_DisableFreqErrorCounter.
__STATIC_INLINE uint32_t LL_CRS_IsEnabledFreqErrorCounter (void)
 Check if Frequency error counter is enabled or not CR CEN LL_CRS_IsEnabledFreqErrorCounter.
__STATIC_INLINE void LL_CRS_EnableAutoTrimming (void)
 Enable Automatic trimming counter CR AUTOTRIMEN LL_CRS_EnableAutoTrimming.
__STATIC_INLINE void LL_CRS_DisableAutoTrimming (void)
 Disable Automatic trimming counter CR AUTOTRIMEN LL_CRS_DisableAutoTrimming.
__STATIC_INLINE uint32_t LL_CRS_IsEnabledAutoTrimming (void)
 Check if Automatic trimming is enabled or not CR AUTOTRIMEN LL_CRS_IsEnabledAutoTrimming.
__STATIC_INLINE void LL_CRS_SetHSI48SmoothTrimming (uint32_t Value)
 Set HSI48 oscillator smooth trimming.
__STATIC_INLINE uint32_t LL_CRS_GetHSI48SmoothTrimming (void)
 Get HSI48 oscillator smooth trimming CR TRIM LL_CRS_GetHSI48SmoothTrimming.
__STATIC_INLINE void LL_CRS_SetReloadCounter (uint32_t Value)
 Set counter reload value CFGR RELOAD LL_CRS_SetReloadCounter.
__STATIC_INLINE uint32_t LL_CRS_GetReloadCounter (void)
 Get counter reload value CFGR RELOAD LL_CRS_GetReloadCounter.
__STATIC_INLINE void LL_CRS_SetFreqErrorLimit (uint32_t Value)
 Set frequency error limit CFGR FELIM LL_CRS_SetFreqErrorLimit.
__STATIC_INLINE uint32_t LL_CRS_GetFreqErrorLimit (void)
 Get frequency error limit CFGR FELIM LL_CRS_GetFreqErrorLimit.
__STATIC_INLINE void LL_CRS_SetSyncDivider (uint32_t Divider)
 Set division factor for SYNC signal CFGR SYNCDIV LL_CRS_SetSyncDivider.
__STATIC_INLINE uint32_t LL_CRS_GetSyncDivider (void)
 Get division factor for SYNC signal CFGR SYNCDIV LL_CRS_GetSyncDivider.
__STATIC_INLINE void LL_CRS_SetSyncSignalSource (uint32_t Source)
 Set SYNC signal source CFGR SYNCSRC LL_CRS_SetSyncSignalSource.
__STATIC_INLINE uint32_t LL_CRS_GetSyncSignalSource (void)
 Get SYNC signal source CFGR SYNCSRC LL_CRS_GetSyncSignalSource.
__STATIC_INLINE void LL_CRS_SetSyncPolarity (uint32_t Polarity)
 Set input polarity for the SYNC signal source CFGR SYNCPOL LL_CRS_SetSyncPolarity.
__STATIC_INLINE uint32_t LL_CRS_GetSyncPolarity (void)
 Get input polarity for the SYNC signal source CFGR SYNCPOL LL_CRS_GetSyncPolarity.
__STATIC_INLINE void LL_CRS_ConfigSynchronization (uint32_t HSI48CalibrationValue, uint32_t ErrorLimitValue, uint32_t ReloadValue, uint32_t Settings)
 Configure CRS for the synchronization CR TRIM LL_CRS_ConfigSynchronization
CFGR RELOAD LL_CRS_ConfigSynchronization
CFGR FELIM LL_CRS_ConfigSynchronization
CFGR SYNCDIV LL_CRS_ConfigSynchronization
CFGR SYNCSRC LL_CRS_ConfigSynchronization
CFGR SYNCPOL LL_CRS_ConfigSynchronization.

Function Documentation

__STATIC_INLINE void LL_CRS_ConfigSynchronization ( uint32_t  HSI48CalibrationValue,
uint32_t  ErrorLimitValue,
uint32_t  ReloadValue,
uint32_t  Settings 
)

Configure CRS for the synchronization CR TRIM LL_CRS_ConfigSynchronization
CFGR RELOAD LL_CRS_ConfigSynchronization
CFGR FELIM LL_CRS_ConfigSynchronization
CFGR SYNCDIV LL_CRS_ConfigSynchronization
CFGR SYNCSRC LL_CRS_ConfigSynchronization
CFGR SYNCPOL LL_CRS_ConfigSynchronization.

Parameters:
HSI48CalibrationValuea number between Min_Data = 0 and Max_Data = 63
ErrorLimitValuea number between Min_Data = 0 and Max_Data = 0xFFFF
ReloadValuea number between Min_Data = 0 and Max_Data = 255
SettingsThis parameter can be a combination of the following values:

  • LL_CRS_SYNC_DIV_1 or LL_CRS_SYNC_DIV_2 or LL_CRS_SYNC_DIV_4 or LL_CRS_SYNC_DIV_8 or LL_CRS_SYNC_DIV_16 or LL_CRS_SYNC_DIV_32 or LL_CRS_SYNC_DIV_64 or LL_CRS_SYNC_DIV_128
  • LL_CRS_SYNC_SOURCE_GPIO or LL_CRS_SYNC_SOURCE_LSE or LL_CRS_SYNC_SOURCE_USB
  • LL_CRS_SYNC_POLARITY_RISING or LL_CRS_SYNC_POLARITY_FALLING
Return values:
None

Definition at line 484 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_DisableAutoTrimming ( void   )

Disable Automatic trimming counter CR AUTOTRIMEN LL_CRS_DisableAutoTrimming.

Return values:
None

Definition at line 294 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_DisableFreqErrorCounter ( void   )

Disable Frequency error counter CR CEN LL_CRS_DisableFreqErrorCounter.

Return values:
None

Definition at line 264 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_EnableAutoTrimming ( void   )

Enable Automatic trimming counter CR AUTOTRIMEN LL_CRS_EnableAutoTrimming.

Return values:
None

Definition at line 284 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_EnableFreqErrorCounter ( void   )

Enable Frequency error counter.

Note:
When this bit is set, the CRS_CFGR register is write-protected and cannot be modified CR CEN LL_CRS_EnableFreqErrorCounter
Return values:
None

Definition at line 254 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetFreqErrorLimit ( void   )

Get frequency error limit CFGR FELIM LL_CRS_GetFreqErrorLimit.

Return values:
Anumber between Min_Data = 0 and Max_Data = 255

Definition at line 372 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetHSI48SmoothTrimming ( void   )

Get HSI48 oscillator smooth trimming CR TRIM LL_CRS_GetHSI48SmoothTrimming.

Return values:
anumber between Min_Data = 0 and Max_Data = 63

Definition at line 327 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetReloadCounter ( void   )

Get counter reload value CFGR RELOAD LL_CRS_GetReloadCounter.

Return values:
anumber between Min_Data = 0 and Max_Data = 0xFFFF

Definition at line 350 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetSyncDivider ( void   )

Get division factor for SYNC signal CFGR SYNCDIV LL_CRS_GetSyncDivider.

Return values:
Returnedvalue can be one of the following values:

  • LL_CRS_SYNC_DIV_1
  • LL_CRS_SYNC_DIV_2
  • LL_CRS_SYNC_DIV_4
  • LL_CRS_SYNC_DIV_8
  • LL_CRS_SYNC_DIV_16
  • LL_CRS_SYNC_DIV_32
  • LL_CRS_SYNC_DIV_64
  • LL_CRS_SYNC_DIV_128

Definition at line 409 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetSyncPolarity ( void   )

Get input polarity for the SYNC signal source CFGR SYNCPOL LL_CRS_GetSyncPolarity.

Return values:
Returnedvalue can be one of the following values:

  • LL_CRS_SYNC_POLARITY_RISING
  • LL_CRS_SYNC_POLARITY_FALLING

Definition at line 461 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_GetSyncSignalSource ( void   )

Get SYNC signal source CFGR SYNCSRC LL_CRS_GetSyncSignalSource.

Return values:
Returnedvalue can be one of the following values:

  • LL_CRS_SYNC_SOURCE_GPIO
  • LL_CRS_SYNC_SOURCE_LSE
  • LL_CRS_SYNC_SOURCE_USB

Definition at line 436 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_IsEnabledAutoTrimming ( void   )

Check if Automatic trimming is enabled or not CR AUTOTRIMEN LL_CRS_IsEnabledAutoTrimming.

Return values:
Stateof bit (1 or 0).

Definition at line 304 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE uint32_t LL_CRS_IsEnabledFreqErrorCounter ( void   )

Check if Frequency error counter is enabled or not CR CEN LL_CRS_IsEnabledFreqErrorCounter.

Return values:
Stateof bit (1 or 0).

Definition at line 274 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetFreqErrorLimit ( uint32_t  Value )

Set frequency error limit CFGR FELIM LL_CRS_SetFreqErrorLimit.

Parameters:
Valuea number between Min_Data = 0 and Max_Data = 255
Note:
Default value can be set thanks to LL_CRS_ERRORLIMIT_DEFAULT
Return values:
None

Definition at line 362 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetHSI48SmoothTrimming ( uint32_t  Value )

Set HSI48 oscillator smooth trimming.

Note:
When the AUTOTRIMEN bit is set, this field is controlled by hardware and is read-only CR TRIM LL_CRS_SetHSI48SmoothTrimming
Parameters:
Valuea number between Min_Data = 0 and Max_Data = 63
Note:
Default value can be set thanks to LL_CRS_HSI48CALIBRATION_DEFAULT
Return values:
None

Definition at line 317 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetReloadCounter ( uint32_t  Value )

Set counter reload value CFGR RELOAD LL_CRS_SetReloadCounter.

Parameters:
Valuea number between Min_Data = 0 and Max_Data = 0xFFFF
Note:
Default value can be set thanks to LL_CRS_RELOADVALUE_DEFAULT Otherwise it can be calculated in using macro __LL_CRS_CALC_CALCULATE_RELOADVALUE (_FTARGET_, _FSYNC_)
Return values:
None

Definition at line 340 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetSyncDivider ( uint32_t  Divider )

Set division factor for SYNC signal CFGR SYNCDIV LL_CRS_SetSyncDivider.

Parameters:
DividerThis parameter can be one of the following values:

  • LL_CRS_SYNC_DIV_1
  • LL_CRS_SYNC_DIV_2
  • LL_CRS_SYNC_DIV_4
  • LL_CRS_SYNC_DIV_8
  • LL_CRS_SYNC_DIV_16
  • LL_CRS_SYNC_DIV_32
  • LL_CRS_SYNC_DIV_64
  • LL_CRS_SYNC_DIV_128
Return values:
None

Definition at line 391 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetSyncPolarity ( uint32_t  Polarity )

Set input polarity for the SYNC signal source CFGR SYNCPOL LL_CRS_SetSyncPolarity.

Parameters:
PolarityThis parameter can be one of the following values:

  • LL_CRS_SYNC_POLARITY_RISING
  • LL_CRS_SYNC_POLARITY_FALLING
Return values:
None

Definition at line 449 of file stm32l4xx_ll_crs.h.

__STATIC_INLINE void LL_CRS_SetSyncSignalSource ( uint32_t  Source )

Set SYNC signal source CFGR SYNCSRC LL_CRS_SetSyncSignalSource.

Parameters:
SourceThis parameter can be one of the following values:

  • LL_CRS_SYNC_SOURCE_GPIO
  • LL_CRS_SYNC_SOURCE_LSE
  • LL_CRS_SYNC_SOURCE_USB
Return values:
None

Definition at line 423 of file stm32l4xx_ll_crs.h.