STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RTC_SetHourFormat (RTC_TypeDef *RTCx, uint32_t HourFormat)
 Set Hours format (24 hour/day or AM/PM hour format) More...
 
__STATIC_INLINE uint32_t LL_RTC_GetHourFormat (RTC_TypeDef *RTCx)
 Get Hours format (24 hour/day or AM/PM hour format) RTC_CR FMT LL_RTC_GetHourFormat. More...
 
__STATIC_INLINE void LL_RTC_SetAlarmOutEvent (RTC_TypeDef *RTCx, uint32_t AlarmOutput)
 Select the flag to be routed to RTC_ALARM output. More...
 
__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent (RTC_TypeDef *RTCx)
 Get the flag to be routed to RTC_ALARM output RTC_CR OSEL LL_RTC_GetAlarmOutEvent. More...
 
__STATIC_INLINE void LL_RTC_SetAlarmOutputType (RTC_TypeDef *RTCx, uint32_t Output)
 Set RTC_ALARM output type (ALARM in push-pull or open-drain output) RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType. More...
 
__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType (RTC_TypeDef *RTCx)
 Get RTC_ALARM output type (ALARM in push-pull or open-drain output) RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType. More...
 
__STATIC_INLINE void LL_RTC_EnableInitMode (RTC_TypeDef *RTCx)
 Enable initialization mode. More...
 
__STATIC_INLINE void LL_RTC_DisableInitMode (RTC_TypeDef *RTCx)
 Disable initialization mode (Free running mode) RTC_ICSR INIT LL_RTC_DisableInitMode. More...
 
__STATIC_INLINE void LL_RTC_SetOutputPolarity (RTC_TypeDef *RTCx, uint32_t Polarity)
 Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted) More...
 
__STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity (RTC_TypeDef *RTCx)
 Get Output polarity RTC_CR POL LL_RTC_GetOutputPolarity. More...
 
__STATIC_INLINE void LL_RTC_EnableShadowRegBypass (RTC_TypeDef *RTCx)
 Enable Bypass the shadow registers. More...
 
__STATIC_INLINE void LL_RTC_DisableShadowRegBypass (RTC_TypeDef *RTCx)
 Disable Bypass the shadow registers RTC_CR BYPSHAD LL_RTC_DisableShadowRegBypass. More...
 
__STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled (RTC_TypeDef *RTCx)
 Check if Shadow registers bypass is enabled or not. RTC_CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled. More...
 
__STATIC_INLINE void LL_RTC_EnableRefClock (RTC_TypeDef *RTCx)
 Enable RTC_REFIN reference clock detection (50 or 60 Hz) More...
 
__STATIC_INLINE void LL_RTC_DisableRefClock (RTC_TypeDef *RTCx)
 Disable RTC_REFIN reference clock detection (50 or 60 Hz) More...
 
__STATIC_INLINE void LL_RTC_SetAsynchPrescaler (RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
 Set Asynchronous prescaler factor RTC_PRER PREDIV_A LL_RTC_SetAsynchPrescaler. More...
 
__STATIC_INLINE void LL_RTC_SetSynchPrescaler (RTC_TypeDef *RTCx, uint32_t SynchPrescaler)
 Set Synchronous prescaler factor RTC_PRER PREDIV_S LL_RTC_SetSynchPrescaler. More...
 
__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler (RTC_TypeDef *RTCx)
 Get Asynchronous prescaler factor RTC_PRER PREDIV_A LL_RTC_GetAsynchPrescaler. More...
 
__STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler (RTC_TypeDef *RTCx)
 Get Synchronous prescaler factor RTC_PRER PREDIV_S LL_RTC_GetSynchPrescaler. More...
 
__STATIC_INLINE void LL_RTC_EnableWriteProtection (RTC_TypeDef *RTCx)
 Enable the write protection for RTC registers. RTC_WPR KEY LL_RTC_EnableWriteProtection. More...
 
__STATIC_INLINE void LL_RTC_DisableWriteProtection (RTC_TypeDef *RTCx)
 Disable the write protection for RTC registers. RTC_WPR KEY LL_RTC_DisableWriteProtection. More...
 
__STATIC_INLINE void LL_RTC_EnableTamperOutput (RTC_TypeDef *RTCx)
 Enable tamper output. More...
 
__STATIC_INLINE void LL_RTC_DisableTamperOutput (RTC_TypeDef *RTCx)
 Disable tamper output. RTC_CR TAMPOE LL_RTC_DisableTamperOutput. More...
 
__STATIC_INLINE uint32_t LL_RTC_IsTamperOutputEnabled (RTC_TypeDef *RTCx)
 Check if tamper output is enabled or not. RTC_CR TAMPOE LL_RTC_IsTamperOutputEnabled. More...
 
__STATIC_INLINE void LL_RTC_EnableAlarmPullUp (RTC_TypeDef *RTCx)
 Enable internal pull-up in output mode. RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp. More...
 
__STATIC_INLINE void LL_RTC_DisableAlarmPullUp (RTC_TypeDef *RTCx)
 Disable internal pull-up in output mode. RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp. More...
 
__STATIC_INLINE uint32_t LL_RTC_IsAlarmPullUpEnabled (RTC_TypeDef *RTCx)
 Check if internal pull-up in output mode is enabled or not. RTC_CR TAMPALRM_PU LL_RTC_IsAlarmPullUpEnabled. More...
 
__STATIC_INLINE void LL_RTC_EnableOutput2 (RTC_TypeDef *RTCx)
 Enable RTC_OUT2 output. More...
 
__STATIC_INLINE void LL_RTC_DisableOutput2 (RTC_TypeDef *RTCx)
 Disable RTC_OUT2 output RTC_CR OUT2EN LL_RTC_DisableOutput2. More...
 
__STATIC_INLINE uint32_t LL_RTC_IsOutput2Enabled (RTC_TypeDef *RTCx)
 Check if RTC_OUT2 output is enabled or not. RTC_CR OUT2EN LL_RTC_IsOutput2Enabled. More...
 
__STATIC_INLINE void LL_RTC_EnableOutRemap (RTC_TypeDef *RTCx)
 Enable RTC_OUT remap OR OUT_RMP LL_RTC_EnableOutRemap. More...
 
__STATIC_INLINE void LL_RTC_DisableOutRemap (RTC_TypeDef *RTCx)
 Disable RTC_OUT remap OR OUT_RMP LL_RTC_DisableOutRemap. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_DisableAlarmPullUp()

__STATIC_INLINE void LL_RTC_DisableAlarmPullUp ( RTC_TypeDef *  RTCx)

Disable internal pull-up in output mode. RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1263 of file stm32l4xx_ll_rtc.h.

1264 {
1265  CLEAR_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU);
1266 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableInitMode()

__STATIC_INLINE void LL_RTC_DisableInitMode ( RTC_TypeDef *  RTCx)

Disable initialization mode (Free running mode) RTC_ICSR INIT LL_RTC_DisableInitMode.

Disable initialization mode (Free running mode) ISR INIT LL_RTC_DisableInitMode.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 988 of file stm32l4xx_ll_rtc.h.

989 {
990  /* Exit Initialization mode */
991  WRITE_REG(RTCx->ICSR, (uint32_t)~RTC_ICSR_INIT);
992 }

◆ LL_RTC_DisableOutput2()

__STATIC_INLINE void LL_RTC_DisableOutput2 ( RTC_TypeDef *  RTCx)

Disable RTC_OUT2 output RTC_CR OUT2EN LL_RTC_DisableOutput2.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1299 of file stm32l4xx_ll_rtc.h.

1300 {
1301  CLEAR_BIT(RTCx->CR, RTC_CR_OUT2EN);
1302 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableOutRemap()

__STATIC_INLINE void LL_RTC_DisableOutRemap ( RTC_TypeDef *  RTCx)

Disable RTC_OUT remap OR OUT_RMP LL_RTC_DisableOutRemap.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1334 of file stm32l4xx_ll_rtc.h.

1335 {
1336  CLEAR_BIT(RTCx->OR, RTC_OR_OUT_RMP);
1337 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableRefClock()

__STATIC_INLINE void LL_RTC_DisableRefClock ( RTC_TypeDef *  RTCx)

Disable RTC_REFIN reference clock detection (50 or 60 Hz)

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function) RTC_CR REFCKON LL_RTC_DisableRefClock
Parameters
RTCxRTC Instance
Return values
None

Definition at line 1136 of file stm32l4xx_ll_rtc.h.

1137 {
1138  CLEAR_BIT(RTCx->CR, RTC_CR_REFCKON);
1139 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableShadowRegBypass()

__STATIC_INLINE void LL_RTC_DisableShadowRegBypass ( RTC_TypeDef *  RTCx)

Disable Bypass the shadow registers RTC_CR BYPSHAD LL_RTC_DisableShadowRegBypass.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1099 of file stm32l4xx_ll_rtc.h.

1100 {
1101  CLEAR_BIT(RTCx->CR, RTC_CR_BYPSHAD);
1102 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableTamperOutput()

__STATIC_INLINE void LL_RTC_DisableTamperOutput ( RTC_TypeDef *  RTCx)

Disable tamper output. RTC_CR TAMPOE LL_RTC_DisableTamperOutput.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1230 of file stm32l4xx_ll_rtc.h.

1231 {
1232  CLEAR_BIT(RTCx->CR, RTC_CR_TAMPOE);
1233 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_DisableWriteProtection()

__STATIC_INLINE void LL_RTC_DisableWriteProtection ( RTC_TypeDef *  RTCx)

Disable the write protection for RTC registers. RTC_WPR KEY LL_RTC_DisableWriteProtection.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1204 of file stm32l4xx_ll_rtc.h.

1205 {
1206  WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1);
1207  WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2);
1208 }

◆ LL_RTC_EnableAlarmPullUp()

__STATIC_INLINE void LL_RTC_EnableAlarmPullUp ( RTC_TypeDef *  RTCx)

Enable internal pull-up in output mode. RTC_CR TAMPALRM_PU LL_RTC_EnableAlarmPullUp.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1252 of file stm32l4xx_ll_rtc.h.

1253 {
1254  SET_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU);
1255 }

◆ LL_RTC_EnableInitMode()

__STATIC_INLINE void LL_RTC_EnableInitMode ( RTC_TypeDef *  RTCx)

Enable initialization mode.

Note
Initialization mode is used to program time and date register (RTC_TR and RTC_DR) and prescaler register (RTC_PRER). Counters are stopped and start counting from the new value when INIT is reset. RTC_ICSR INIT LL_RTC_EnableInitMode
Parameters
RTCxRTC Instance
Return values
None
Note
Initialization mode is used to program time and date register (RTC_TR and RTC_DR) and prescaler register (RTC_PRER). Counters are stopped and start counting from the new value when INIT is reset. ISR INIT LL_RTC_EnableInitMode
Parameters
RTCxRTC Instance
Return values
None

Definition at line 976 of file stm32l4xx_ll_rtc.h.

977 {
978  /* Set the Initialization mode */
979  WRITE_REG(RTCx->ICSR, RTC_LL_INIT_MASK);
980 }

◆ LL_RTC_EnableOutput2()

__STATIC_INLINE void LL_RTC_EnableOutput2 ( RTC_TypeDef *  RTCx)

Enable RTC_OUT2 output.

Note
RTC_OUT2 mapping depends on both OSEL (LL_RTC_SetAlarmOutEvent) and COE (LL_RTC_CAL_SetOutputFreq) settings.
RTC_OUT2 isn't available ins VBAT mode. RTC_CR OUT2EN LL_RTC_EnableOutput2
Parameters
RTCxRTC Instance
Return values
None

Definition at line 1288 of file stm32l4xx_ll_rtc.h.

1289 {
1290  SET_BIT(RTCx->CR, RTC_CR_OUT2EN);
1291 }

◆ LL_RTC_EnableOutRemap()

__STATIC_INLINE void LL_RTC_EnableOutRemap ( RTC_TypeDef *  RTCx)

Enable RTC_OUT remap OR OUT_RMP LL_RTC_EnableOutRemap.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1323 of file stm32l4xx_ll_rtc.h.

1324 {
1325  SET_BIT(RTCx->OR, RTC_OR_OUT_RMP);
1326 }

◆ LL_RTC_EnableRefClock()

__STATIC_INLINE void LL_RTC_EnableRefClock ( RTC_TypeDef *  RTCx)

Enable RTC_REFIN reference clock detection (50 or 60 Hz)

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function) RTC_CR REFCKON LL_RTC_EnableRefClock
Parameters
RTCxRTC Instance
Return values
None

Definition at line 1123 of file stm32l4xx_ll_rtc.h.

1124 {
1125  SET_BIT(RTCx->CR, RTC_CR_REFCKON);
1126 }

◆ LL_RTC_EnableShadowRegBypass()

__STATIC_INLINE void LL_RTC_EnableShadowRegBypass ( RTC_TypeDef *  RTCx)

Enable Bypass the shadow registers.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before. RTC_CR BYPSHAD LL_RTC_EnableShadowRegBypass
Parameters
RTCxRTC Instance
Return values
None

Definition at line 1088 of file stm32l4xx_ll_rtc.h.

1089 {
1090  SET_BIT(RTCx->CR, RTC_CR_BYPSHAD);
1091 }

◆ LL_RTC_EnableTamperOutput()

__STATIC_INLINE void LL_RTC_EnableTamperOutput ( RTC_TypeDef *  RTCx)

Enable tamper output.

Note
When the tamper output is enabled, all external and internal tamper flags are ORed and routed to the TAMPALRM output. RTC_CR TAMPOE LL_RTC_EnableTamperOutput
Parameters
RTCxRTC Instance
Return values
None

Definition at line 1219 of file stm32l4xx_ll_rtc.h.

1220 {
1221  SET_BIT(RTCx->CR, RTC_CR_TAMPOE);
1222 }

◆ LL_RTC_EnableWriteProtection()

__STATIC_INLINE void LL_RTC_EnableWriteProtection ( RTC_TypeDef *  RTCx)

Enable the write protection for RTC registers. RTC_WPR KEY LL_RTC_EnableWriteProtection.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1193 of file stm32l4xx_ll_rtc.h.

1194 {
1195  WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE);
1196 }

◆ LL_RTC_GetAlarmOutEvent()

__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent ( RTC_TypeDef *  RTCx)

Get the flag to be routed to RTC_ALARM output RTC_CR OSEL LL_RTC_GetAlarmOutEvent.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_ALARMOUT_DISABLE
  • LL_RTC_ALARMOUT_ALMA
  • LL_RTC_ALARMOUT_ALMB
  • LL_RTC_ALARMOUT_WAKEUP

Definition at line 934 of file stm32l4xx_ll_rtc.h.

935 {
936  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_OSEL));
937 }

◆ LL_RTC_GetAlarmOutputType()

__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType ( RTC_TypeDef *  RTCx)

Get RTC_ALARM output type (ALARM in push-pull or open-drain output) RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType.

Get RTC_ALARM output type (ALARM in push-pull or open-drain output)

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
  • LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
Note
used only when RTC_ALARM is mapped on PC13 OR ALARMOUTTYPE LL_RTC_GetAlarmOutputType
Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
  • LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL

Definition at line 962 of file stm32l4xx_ll_rtc.h.

963 {
964  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TAMPALRM_TYPE));
965 }

◆ LL_RTC_GetAsynchPrescaler()

__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler ( RTC_TypeDef *  RTCx)

Get Asynchronous prescaler factor RTC_PRER PREDIV_A LL_RTC_GetAsynchPrescaler.

Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data = 0 and Max_Data = 0x7F

Definition at line 1171 of file stm32l4xx_ll_rtc.h.

1172 {
1173  return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_PRER_PREDIV_A_Pos);
1174 }

◆ LL_RTC_GetHourFormat()

__STATIC_INLINE uint32_t LL_RTC_GetHourFormat ( RTC_TypeDef *  RTCx)

Get Hours format (24 hour/day or AM/PM hour format) RTC_CR FMT LL_RTC_GetHourFormat.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_HOURFORMAT_24HOUR
  • LL_RTC_HOURFORMAT_AMPM

Definition at line 902 of file stm32l4xx_ll_rtc.h.

903 {
904  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_FMT));
905 }

◆ LL_RTC_GetOutputPolarity()

__STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity ( RTC_TypeDef *  RTCx)

Get Output polarity RTC_CR POL LL_RTC_GetOutputPolarity.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_OUTPUTPOLARITY_PIN_HIGH
  • LL_RTC_OUTPUTPOLARITY_PIN_LOW

Definition at line 1076 of file stm32l4xx_ll_rtc.h.

1077 {
1078  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_POL));
1079 }

◆ LL_RTC_GetSynchPrescaler()

__STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler ( RTC_TypeDef *  RTCx)

Get Synchronous prescaler factor RTC_PRER PREDIV_S LL_RTC_GetSynchPrescaler.

Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data = 0 and Max_Data = 0x7FFF

Definition at line 1182 of file stm32l4xx_ll_rtc.h.

1183 {
1184  return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_S));
1185 }

◆ LL_RTC_IsAlarmPullUpEnabled()

__STATIC_INLINE uint32_t LL_RTC_IsAlarmPullUpEnabled ( RTC_TypeDef *  RTCx)

Check if internal pull-up in output mode is enabled or not. RTC_CR TAMPALRM_PU LL_RTC_IsAlarmPullUpEnabled.

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

Definition at line 1274 of file stm32l4xx_ll_rtc.h.

1275 {
1276  return (READ_BIT(RTCx->CR, RTC_CR_TAMPALRM_PU) == (RTC_CR_TAMPALRM_PU));
1277 }

◆ LL_RTC_IsOutput2Enabled()

__STATIC_INLINE uint32_t LL_RTC_IsOutput2Enabled ( RTC_TypeDef *  RTCx)

Check if RTC_OUT2 output is enabled or not. RTC_CR OUT2EN LL_RTC_IsOutput2Enabled.

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

Definition at line 1310 of file stm32l4xx_ll_rtc.h.

1311 {
1312  return (READ_BIT(RTCx->CR, RTC_CR_OUT2EN) == (RTC_CR_OUT2EN));
1313 }

◆ LL_RTC_IsShadowRegBypassEnabled()

__STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled ( RTC_TypeDef *  RTCx)

Check if Shadow registers bypass is enabled or not. RTC_CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled.

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

Definition at line 1110 of file stm32l4xx_ll_rtc.h.

1111 {
1112  return (READ_BIT(RTCx->CR, RTC_CR_BYPSHAD) == (RTC_CR_BYPSHAD));
1113 }

◆ LL_RTC_IsTamperOutputEnabled()

__STATIC_INLINE uint32_t LL_RTC_IsTamperOutputEnabled ( RTC_TypeDef *  RTCx)

Check if tamper output is enabled or not. RTC_CR TAMPOE LL_RTC_IsTamperOutputEnabled.

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

Definition at line 1241 of file stm32l4xx_ll_rtc.h.

1242 {
1243  return (READ_BIT(RTCx->CR, RTC_CR_TAMPOE) == (RTC_CR_TAMPOE));
1244 }

◆ LL_RTC_SetAlarmOutEvent()

__STATIC_INLINE void LL_RTC_SetAlarmOutEvent ( RTC_TypeDef *  RTCx,
uint32_t  AlarmOutput 
)

Select the flag to be routed to RTC_ALARM output.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before. RTC_CR OSEL LL_RTC_SetAlarmOutEvent
Parameters
RTCxRTC Instance
AlarmOutputThis parameter can be one of the following values:
  • LL_RTC_ALARMOUT_DISABLE
  • LL_RTC_ALARMOUT_ALMA
  • LL_RTC_ALARMOUT_ALMB
  • LL_RTC_ALARMOUT_WAKEUP
Return values
None

Definition at line 919 of file stm32l4xx_ll_rtc.h.

920 {
921  MODIFY_REG(RTCx->CR, RTC_CR_OSEL, AlarmOutput);
922 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_SetAlarmOutputType()

__STATIC_INLINE void LL_RTC_SetAlarmOutputType ( RTC_TypeDef *  RTCx,
uint32_t  Output 
)

Set RTC_ALARM output type (ALARM in push-pull or open-drain output) RTC_CR TAMPALRM_TYPE LL_RTC_SetAlarmOutputType.

Set RTC_ALARM output type (ALARM in push-pull or open-drain output)

Parameters
RTCxRTC Instance
OutputThis parameter can be one of the following values:
  • LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
  • LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
Return values
None
Note
Used only when RTC_ALARM is mapped on PC13 OR ALARMOUTTYPE LL_RTC_SetAlarmOutputType
Parameters
RTCxRTC Instance
OutputThis parameter can be one of the following values:
  • LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN
  • LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL
Return values
None

Definition at line 949 of file stm32l4xx_ll_rtc.h.

950 {
951  MODIFY_REG(RTCx->CR, RTC_CR_TAMPALRM_TYPE, Output);
952 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_SetAsynchPrescaler()

__STATIC_INLINE void LL_RTC_SetAsynchPrescaler ( RTC_TypeDef *  RTCx,
uint32_t  AsynchPrescaler 
)

Set Asynchronous prescaler factor RTC_PRER PREDIV_A LL_RTC_SetAsynchPrescaler.

Parameters
RTCxRTC Instance
AsynchPrescalerValue between Min_Data = 0 and Max_Data = 0x7F
Return values
None

Definition at line 1148 of file stm32l4xx_ll_rtc.h.

1149 {
1150  MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_PRER_PREDIV_A_Pos);
1151 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_SetHourFormat()

__STATIC_INLINE void LL_RTC_SetHourFormat ( RTC_TypeDef *  RTCx,
uint32_t  HourFormat 
)

Set Hours format (24 hour/day or AM/PM hour format)

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
It can be written in initialization mode only (LL_RTC_EnableInitMode function) RTC_CR FMT LL_RTC_SetHourFormat
Parameters
RTCxRTC Instance
HourFormatThis parameter can be one of the following values:
  • LL_RTC_HOURFORMAT_24HOUR
  • LL_RTC_HOURFORMAT_AMPM
Return values
None

Definition at line 889 of file stm32l4xx_ll_rtc.h.

890 {
891  MODIFY_REG(RTCx->CR, RTC_CR_FMT, HourFormat);
892 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_SetOutputPolarity()

__STATIC_INLINE void LL_RTC_SetOutputPolarity ( RTC_TypeDef *  RTCx,
uint32_t  Polarity 
)

Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted)

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before. RTC_CR POL LL_RTC_SetOutputPolarity
Parameters
RTCxRTC Instance
PolarityThis parameter can be one of the following values:
  • LL_RTC_OUTPUTPOLARITY_PIN_HIGH
  • LL_RTC_OUTPUTPOLARITY_PIN_LOW
Return values
None

Definition at line 1063 of file stm32l4xx_ll_rtc.h.

1064 {
1065  MODIFY_REG(RTCx->CR, RTC_CR_POL, Polarity);
1066 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_SetSynchPrescaler()

__STATIC_INLINE void LL_RTC_SetSynchPrescaler ( RTC_TypeDef *  RTCx,
uint32_t  SynchPrescaler 
)

Set Synchronous prescaler factor RTC_PRER PREDIV_S LL_RTC_SetSynchPrescaler.

Parameters
RTCxRTC Instance
SynchPrescalerValue between Min_Data = 0 and Max_Data = 0x7FFF
Return values
None

Definition at line 1160 of file stm32l4xx_ll_rtc.h.

1161 {
1162  MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_S, SynchPrescaler);
1163 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)