STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RTC_CAL_SetOutputFreq (RTC_TypeDef *RTCx, uint32_t Frequency)
 Set Calibration output frequency (1 Hz or 512 Hz) More...
 
__STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq (RTC_TypeDef *RTCx)
 Get Calibration output frequency (1 Hz or 512 Hz) RTC_CR COE LL_RTC_CAL_GetOutputFreq
RTC_CR COSEL LL_RTC_CAL_GetOutputFreq. More...
 
__STATIC_INLINE void LL_RTC_CAL_SetPulse (RTC_TypeDef *RTCx, uint32_t Pulse)
 Insert or not One RTCCLK pulse every 2exp11 pulses (frequency increased by 488.5 ppm) More...
 
__STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted (RTC_TypeDef *RTCx)
 Check if one RTCCLK has been inserted or not every 2exp11 pulses (frequency increased by 488.5 ppm) RTC_CALR CALP LL_RTC_CAL_IsPulseInserted. More...
 
__STATIC_INLINE void LL_RTC_CAL_SetPeriod (RTC_TypeDef *RTCx, uint32_t Period)
 Set the calibration cycle period. More...
 
__STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod (RTC_TypeDef *RTCx)
 Get the calibration cycle period RTC_CALR CALW8 LL_RTC_CAL_GetPeriod
RTC_CALR CALW16 LL_RTC_CAL_GetPeriod. More...
 
__STATIC_INLINE void LL_RTC_CAL_SetMinus (RTC_TypeDef *RTCx, uint32_t CalibMinus)
 Set Calibration minus. More...
 
__STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus (RTC_TypeDef *RTCx)
 Get Calibration minus RTC_CALR CALM LL_RTC_CAL_GetMinus. More...
 
__STATIC_INLINE void LL_RTC_CAL_LowPower_Enable (RTC_TypeDef *RTCx)
 Enable Calibration Low Power. More...
 
__STATIC_INLINE void LL_RTC_CAL_LowPower_Disable (RTC_TypeDef *RTCx)
 Disable Calibration Low Power. More...
 
__STATIC_INLINE uint32_t LL_RTC_CAL_LowPower_IsEnabled (RTC_TypeDef *RTCx)
 Check if Calibration Low Power is enabled or not RTC_CALR LPCAL LL_RTC_CAL_LowPower_IsEnabled. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_CAL_GetMinus()

__STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus ( RTC_TypeDef *  RTCx)

Get Calibration minus RTC_CALR CALM LL_RTC_CAL_GetMinus.

Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data=0x00 and Max_Data= 0x1FF

Definition at line 3101 of file stm32l4xx_ll_rtc.h.

3102 {
3103  return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALM));
3104 }

◆ LL_RTC_CAL_GetOutputFreq()

__STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq ( RTC_TypeDef *  RTCx)

Get Calibration output frequency (1 Hz or 512 Hz) RTC_CR COE LL_RTC_CAL_GetOutputFreq
RTC_CR COSEL LL_RTC_CAL_GetOutputFreq.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_CALIB_OUTPUT_NONE
  • LL_RTC_CALIB_OUTPUT_1HZ
  • LL_RTC_CALIB_OUTPUT_512HZ

Definition at line 3016 of file stm32l4xx_ll_rtc.h.

3017 {
3018  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL));
3019 }

◆ LL_RTC_CAL_GetPeriod()

__STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod ( RTC_TypeDef *  RTCx)

Get the calibration cycle period RTC_CALR CALW8 LL_RTC_CAL_GetPeriod
RTC_CALR CALW16 LL_RTC_CAL_GetPeriod.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_CALIB_PERIOD_32SEC
  • LL_RTC_CALIB_PERIOD_16SEC
  • LL_RTC_CALIB_PERIOD_8SEC

Definition at line 3076 of file stm32l4xx_ll_rtc.h.

3077 {
3078  return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16));
3079 }

◆ LL_RTC_CAL_IsPulseInserted()

__STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted ( RTC_TypeDef *  RTCx)

Check if one RTCCLK has been inserted or not every 2exp11 pulses (frequency increased by 488.5 ppm) RTC_CALR CALP LL_RTC_CAL_IsPulseInserted.

Parameters
RTCxRTC Instance
Return values
Stateof bit (1 or 0).

Definition at line 3043 of file stm32l4xx_ll_rtc.h.

3044 {
3045  return (READ_BIT(RTCx->CALR, RTC_CALR_CALP) == (RTC_CALR_CALP));
3046 }

◆ LL_RTC_CAL_LowPower_Disable()

__STATIC_INLINE void LL_RTC_CAL_LowPower_Disable ( RTC_TypeDef *  RTCx)

Disable Calibration Low Power.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RECALPF is set to 0 RTC_CALR LPCAL LL_RTC_CAL_LowPower_Disable
Parameters
RTCxRTC Instance
Return values
None

Definition at line 3128 of file stm32l4xx_ll_rtc.h.

3129 {
3130  CLEAR_BIT(RTCx->CALR, RTC_CALR_LPCAL);
3131 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_CAL_LowPower_Enable()

__STATIC_INLINE void LL_RTC_CAL_LowPower_Enable ( RTC_TypeDef *  RTCx)

Enable Calibration Low Power.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RECALPF is set to 0 RTC_CALR LPCAL LL_RTC_CAL_LowPower_Enable
Parameters
RTCxRTC Instance
Return values
None

Definition at line 3115 of file stm32l4xx_ll_rtc.h.

3116 {
3117  SET_BIT(RTCx->CALR, RTC_CALR_LPCAL);
3118 }

◆ LL_RTC_CAL_LowPower_IsEnabled()

__STATIC_INLINE uint32_t LL_RTC_CAL_LowPower_IsEnabled ( RTC_TypeDef *  RTCx)

Check if Calibration Low Power is enabled or not RTC_CALR LPCAL LL_RTC_CAL_LowPower_IsEnabled.

Parameters
RTCxRTC Instance
Return values
Stateof bit (1 or 0).

Definition at line 3139 of file stm32l4xx_ll_rtc.h.

3140 {
3141  return (READ_BIT(RTCx->CALR, RTC_CALR_LPCAL) == (RTC_CALR_LPCAL));
3142 }

◆ LL_RTC_CAL_SetMinus()

__STATIC_INLINE void LL_RTC_CAL_SetMinus ( RTC_TypeDef *  RTCx,
uint32_t  CalibMinus 
)

Set Calibration minus.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RECALPF is set to 0 RTC_CALR CALM LL_RTC_CAL_SetMinus
Parameters
RTCxRTC Instance
CalibMinusValue between Min_Data=0x00 and Max_Data=0x1FF
Return values
None

Definition at line 3090 of file stm32l4xx_ll_rtc.h.

3091 {
3092  MODIFY_REG(RTCx->CALR, RTC_CALR_CALM, CalibMinus);
3093 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_CAL_SetOutputFreq()

__STATIC_INLINE void LL_RTC_CAL_SetOutputFreq ( RTC_TypeDef *  RTCx,
uint32_t  Frequency 
)

Set Calibration output frequency (1 Hz or 512 Hz)

Note
Bits are write-protected. LL_RTC_DisableWriteProtection function should be called before. RTC_CR COE LL_RTC_CAL_SetOutputFreq
RTC_CR COSEL LL_RTC_CAL_SetOutputFreq
Parameters
RTCxRTC Instance
FrequencyThis parameter can be one of the following values:
  • LL_RTC_CALIB_OUTPUT_NONE
  • LL_RTC_CALIB_OUTPUT_1HZ
  • LL_RTC_CALIB_OUTPUT_512HZ
Return values
None

Definition at line 3001 of file stm32l4xx_ll_rtc.h.

3002 {
3003  MODIFY_REG(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL, Frequency);
3004 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_CAL_SetPeriod()

__STATIC_INLINE void LL_RTC_CAL_SetPeriod ( RTC_TypeDef *  RTCx,
uint32_t  Period 
)

Set the calibration cycle period.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RECALPF is set to 0 RTC_CALR CALW8 LL_RTC_CAL_SetPeriod
RTC_CALR CALW16 LL_RTC_CAL_SetPeriod
Parameters
RTCxRTC Instance
PeriodThis parameter can be one of the following values:
  • LL_RTC_CALIB_PERIOD_32SEC
  • LL_RTC_CALIB_PERIOD_16SEC
  • LL_RTC_CALIB_PERIOD_8SEC
Return values
None

Definition at line 3061 of file stm32l4xx_ll_rtc.h.

3062 {
3063  MODIFY_REG(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16, Period);
3064 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_CAL_SetPulse()

__STATIC_INLINE void LL_RTC_CAL_SetPulse ( RTC_TypeDef *  RTCx,
uint32_t  Pulse 
)

Insert or not One RTCCLK pulse every 2exp11 pulses (frequency increased by 488.5 ppm)

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RECALPF is set to 0 RTC_CALR CALP LL_RTC_CAL_SetPulse
Parameters
RTCxRTC Instance
PulseThis parameter can be one of the following values:
  • LL_RTC_CALIB_INSERTPULSE_NONE
  • LL_RTC_CALIB_INSERTPULSE_SET
Return values
None

Definition at line 3032 of file stm32l4xx_ll_rtc.h.

3033 {
3034  MODIFY_REG(RTCx->CALR, RTC_CALR_CALP, Pulse);
3035 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)