STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RTC_ALMA_Enable (RTC_TypeDef *RTCx)
 Enable Alarm A. More...
 
__STATIC_INLINE void LL_RTC_ALMA_Disable (RTC_TypeDef *RTCx)
 Disable Alarm A. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetMask (RTC_TypeDef *RTCx, uint32_t Mask)
 Specify the Alarm A masks. RTC_ALRMAR MSK4 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK3 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK2 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK1 LL_RTC_ALMA_SetMask. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask (RTC_TypeDef *RTCx)
 Get the Alarm A masks. RTC_ALRMAR MSK4 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK3 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK2 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK1 LL_RTC_ALMA_GetMask. More...
 
__STATIC_INLINE void LL_RTC_ALMA_EnableWeekday (RTC_TypeDef *RTCx)
 Enable AlarmA Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care) RTC_ALRMAR WDSEL LL_RTC_ALMA_EnableWeekday. More...
 
__STATIC_INLINE void LL_RTC_ALMA_DisableWeekday (RTC_TypeDef *RTCx)
 Disable AlarmA Week day selection (DU[3:0] represents the date ) RTC_ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetDay (RTC_TypeDef *RTCx, uint32_t Day)
 Set ALARM A Day in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay (RTC_TypeDef *RTCx)
 Get ALARM A Day in BCD format. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetWeekDay (RTC_TypeDef *RTCx, uint32_t WeekDay)
 Set ALARM A Weekday RTC_ALRMAR DU LL_RTC_ALMA_SetWeekDay. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay (RTC_TypeDef *RTCx)
 Get ALARM A Weekday RTC_ALRMAR DU LL_RTC_ALMA_GetWeekDay. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat (RTC_TypeDef *RTCx, uint32_t TimeFormat)
 Set Alarm A time format (AM/24-hour or PM notation) RTC_ALRMAR PM LL_RTC_ALMA_SetTimeFormat. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat (RTC_TypeDef *RTCx)
 Get Alarm A time format (AM or PM notation) RTC_ALRMAR PM LL_RTC_ALMA_GetTimeFormat. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetHour (RTC_TypeDef *RTCx, uint32_t Hours)
 Set ALARM A Hours in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour (RTC_TypeDef *RTCx)
 Get ALARM A Hours in BCD format. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetMinute (RTC_TypeDef *RTCx, uint32_t Minutes)
 Set ALARM A Minutes in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute (RTC_TypeDef *RTCx)
 Get ALARM A Minutes in BCD format. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetSecond (RTC_TypeDef *RTCx, uint32_t Seconds)
 Set ALARM A Seconds in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond (RTC_TypeDef *RTCx)
 Get ALARM A Seconds in BCD format. More...
 
__STATIC_INLINE void LL_RTC_ALMA_ConfigTime (RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
 Set Alarm A Time (hour, minute and second) in BCD format RTC_ALRMAR PM LL_RTC_ALMA_ConfigTime
RTC_ALRMAR HT LL_RTC_ALMA_ConfigTime
RTC_ALRMAR HU LL_RTC_ALMA_ConfigTime
RTC_ALRMAR MNT LL_RTC_ALMA_ConfigTime
RTC_ALRMAR MNU LL_RTC_ALMA_ConfigTime
RTC_ALRMAR ST LL_RTC_ALMA_ConfigTime
RTC_ALRMAR SU LL_RTC_ALMA_ConfigTime. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime (RTC_TypeDef *RTCx)
 Get Alarm B Time (hour, minute and second) in BCD format. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask (RTC_TypeDef *RTCx, uint32_t Mask)
 Set Alarm A Mask the most-significant bits starting at this bit. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask (RTC_TypeDef *RTCx)
 Get Alarm A Mask the most-significant bits starting at this bit RTC_ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask. More...
 
__STATIC_INLINE void LL_RTC_ALMA_SetSubSecond (RTC_TypeDef *RTCx, uint32_t Subsecond)
 Set Alarm A Sub seconds value RCT_ALRMASSR SS LL_RTC_ALMA_SetSubSecond. More...
 
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond (RTC_TypeDef *RTCx)
 Get Alarm A Sub seconds value RCT_ALRMASSR SS LL_RTC_ALMA_GetSubSecond. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_ALMA_ConfigTime()

__STATIC_INLINE void LL_RTC_ALMA_ConfigTime ( RTC_TypeDef *  RTCx,
uint32_t  Format12_24,
uint32_t  Hours,
uint32_t  Minutes,
uint32_t  Seconds 
)

Set Alarm A Time (hour, minute and second) in BCD format RTC_ALRMAR PM LL_RTC_ALMA_ConfigTime
RTC_ALRMAR HT LL_RTC_ALMA_ConfigTime
RTC_ALRMAR HU LL_RTC_ALMA_ConfigTime
RTC_ALRMAR MNT LL_RTC_ALMA_ConfigTime
RTC_ALRMAR MNU LL_RTC_ALMA_ConfigTime
RTC_ALRMAR ST LL_RTC_ALMA_ConfigTime
RTC_ALRMAR SU LL_RTC_ALMA_ConfigTime.

Parameters
RTCxRTC Instance
Format12_24This parameter can be one of the following values:
  • LL_RTC_ALMA_TIME_FORMAT_AM
  • LL_RTC_ALMA_TIME_FORMAT_PM
HoursValue between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
MinutesValue between Min_Data=0x00 and Max_Data=0x59
SecondsValue between Min_Data=0x00 and Max_Data=0x59
Return values
None

Definition at line 2165 of file stm32l4xx_ll_rtc.h.

2166 {
2167  register uint32_t temp = 0U;
2168 
2169  temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \
2170  (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \
2171  (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos));
2172 
2173  MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST | RTC_ALRMAR_SU, temp);
2174 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_Disable()

__STATIC_INLINE void LL_RTC_ALMA_Disable ( RTC_TypeDef *  RTCx)

Disable Alarm A.

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

Definition at line 1903 of file stm32l4xx_ll_rtc.h.

1904 {
1905  CLEAR_BIT(RTCx->CR, RTC_CR_ALRAE);
1906 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_ALMA_DisableWeekday()

__STATIC_INLINE void LL_RTC_ALMA_DisableWeekday ( RTC_TypeDef *  RTCx)

Disable AlarmA Week day selection (DU[3:0] represents the date ) RTC_ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1966 of file stm32l4xx_ll_rtc.h.

1967 {
1968  CLEAR_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
1969 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_ALMA_Enable()

__STATIC_INLINE void LL_RTC_ALMA_Enable ( RTC_TypeDef *  RTCx)

Enable Alarm A.

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

Definition at line 1891 of file stm32l4xx_ll_rtc.h.

1892 {
1893  SET_BIT(RTCx->CR, RTC_CR_ALRAE);
1894 }

◆ LL_RTC_ALMA_EnableWeekday()

__STATIC_INLINE void LL_RTC_ALMA_EnableWeekday ( RTC_TypeDef *  RTCx)

Enable AlarmA Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care) RTC_ALRMAR WDSEL LL_RTC_ALMA_EnableWeekday.

Parameters
RTCxRTC Instance
Return values
None

Definition at line 1955 of file stm32l4xx_ll_rtc.h.

1956 {
1957  SET_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
1958 }

◆ LL_RTC_ALMA_GetDay()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay ( RTC_TypeDef *  RTCx)

Get ALARM A Day in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format RTC_ALRMAR DT LL_RTC_ALMA_GetDay
RTC_ALRMAR DU LL_RTC_ALMA_GetDay
Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data=0x01 and Max_Data=0x31

Definition at line 1994 of file stm32l4xx_ll_rtc.h.

1995 {
1996  return ((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU))) >> RTC_ALRMAR_DU_Pos);
1997 }

◆ LL_RTC_ALMA_GetHour()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour ( RTC_TypeDef *  RTCx)

Get ALARM A Hours in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format RTC_ALRMAR HT LL_RTC_ALMA_GetHour
RTC_ALRMAR HU LL_RTC_ALMA_GetHour
Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23

Definition at line 2086 of file stm32l4xx_ll_rtc.h.

2087 {
2088  return ((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU))) >> RTC_ALRMAR_HU_Pos);
2089 }

◆ LL_RTC_ALMA_GetMask()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask ( RTC_TypeDef *  RTCx)

Get the Alarm A masks. RTC_ALRMAR MSK4 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK3 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK2 LL_RTC_ALMA_GetMask
RTC_ALRMAR MSK1 LL_RTC_ALMA_GetMask.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be can be a combination of the following values:
  • LL_RTC_ALMA_MASK_NONE
  • LL_RTC_ALMA_MASK_DATEWEEKDAY
  • LL_RTC_ALMA_MASK_HOURS
  • LL_RTC_ALMA_MASK_MINUTES
  • LL_RTC_ALMA_MASK_SECONDS
  • LL_RTC_ALMA_MASK_ALL

Definition at line 1944 of file stm32l4xx_ll_rtc.h.

1945 {
1946  return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1));
1947 }

◆ LL_RTC_ALMA_GetMinute()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute ( RTC_TypeDef *  RTCx)

Get ALARM A Minutes in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format RTC_ALRMAR MNT LL_RTC_ALMA_GetMinute
RTC_ALRMAR MNU LL_RTC_ALMA_GetMinute
Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data=0x00 and Max_Data=0x59

Definition at line 2114 of file stm32l4xx_ll_rtc.h.

2115 {
2116  return ((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU))) >> RTC_ALRMAR_MNU_Pos);
2117 }

◆ LL_RTC_ALMA_GetSecond()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond ( RTC_TypeDef *  RTCx)

Get ALARM A Seconds in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format RTC_ALRMAR ST LL_RTC_ALMA_GetSecond
RTC_ALRMAR SU LL_RTC_ALMA_GetSecond
Parameters
RTCxRTC Instance
Return values
Valuebetween Min_Data=0x00 and Max_Data=0x59

Definition at line 2142 of file stm32l4xx_ll_rtc.h.

2143 {
2144  return ((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU))) >> RTC_ALRMAR_SU_Pos);
2145 }

◆ LL_RTC_ALMA_GetSubSecond()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond ( RTC_TypeDef *  RTCx)

Get Alarm A Sub seconds value RCT_ALRMASSR SS LL_RTC_ALMA_GetSubSecond.

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

Definition at line 2237 of file stm32l4xx_ll_rtc.h.

2238 {
2239  return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_SS));
2240 }

◆ LL_RTC_ALMA_GetSubSecondMask()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask ( RTC_TypeDef *  RTCx)

Get Alarm A Mask the most-significant bits starting at this bit RTC_ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask.

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

Definition at line 2214 of file stm32l4xx_ll_rtc.h.

2215 {
2216  return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_ALRMASSR_MASKSS_Pos);
2217 }

◆ LL_RTC_ALMA_GetTime()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime ( RTC_TypeDef *  RTCx)

Get Alarm B Time (hour, minute and second) in BCD format.

Note
helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND are available to get independently each parameter. RTC_ALRMAR HT LL_RTC_ALMA_GetTime
RTC_ALRMAR HU LL_RTC_ALMA_GetTime
RTC_ALRMAR MNT LL_RTC_ALMA_GetTime
RTC_ALRMAR MNU LL_RTC_ALMA_GetTime
RTC_ALRMAR ST LL_RTC_ALMA_GetTime
RTC_ALRMAR SU LL_RTC_ALMA_GetTime
Parameters
RTCxRTC Instance
Return values
Combinationof hours, minutes and seconds.

Definition at line 2189 of file stm32l4xx_ll_rtc.h.

2190 {
2191  return (uint32_t)((LL_RTC_ALMA_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMA_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMA_GetSecond(RTCx));
2192 }
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx)
Get ALARM A Seconds in BCD format.
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
Get ALARM A Hours in BCD format.
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
Get ALARM A Minutes in BCD format.

◆ LL_RTC_ALMA_GetTimeFormat()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat ( RTC_TypeDef *  RTCx)

Get Alarm A time format (AM or PM notation) RTC_ALRMAR PM LL_RTC_ALMA_GetTimeFormat.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_ALMA_TIME_FORMAT_AM
  • LL_RTC_ALMA_TIME_FORMAT_PM

Definition at line 2058 of file stm32l4xx_ll_rtc.h.

2059 {
2060  return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_PM));
2061 }

◆ LL_RTC_ALMA_GetWeekDay()

__STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay ( RTC_TypeDef *  RTCx)

Get ALARM A Weekday RTC_ALRMAR DU LL_RTC_ALMA_GetWeekDay.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_WEEKDAY_MONDAY
  • LL_RTC_WEEKDAY_TUESDAY
  • LL_RTC_WEEKDAY_WEDNESDAY
  • LL_RTC_WEEKDAY_THURSDAY
  • LL_RTC_WEEKDAY_FRIDAY
  • LL_RTC_WEEKDAY_SATURDAY
  • LL_RTC_WEEKDAY_SUNDAY

Definition at line 2031 of file stm32l4xx_ll_rtc.h.

2032 {
2033  return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos);
2034 }

◆ LL_RTC_ALMA_SetDay()

__STATIC_INLINE void LL_RTC_ALMA_SetDay ( RTC_TypeDef *  RTCx,
uint32_t  Day 
)

Set ALARM A Day in BCD format.

Note
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format RTC_ALRMAR DT LL_RTC_ALMA_SetDay
RTC_ALRMAR DU LL_RTC_ALMA_SetDay
Parameters
RTCxRTC Instance
DayValue between Min_Data=0x01 and Max_Data=0x31
Return values
None

Definition at line 1980 of file stm32l4xx_ll_rtc.h.

1981 {
1982  MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU),
1983  (((Day & 0xF0U) << (RTC_ALRMAR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMAR_DU_Pos)));
1984 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetHour()

__STATIC_INLINE void LL_RTC_ALMA_SetHour ( RTC_TypeDef *  RTCx,
uint32_t  Hours 
)

Set ALARM A Hours in BCD format.

Note
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format RTC_ALRMAR HT LL_RTC_ALMA_SetHour
RTC_ALRMAR HU LL_RTC_ALMA_SetHour
Parameters
RTCxRTC Instance
HoursValue between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23
Return values
None

Definition at line 2072 of file stm32l4xx_ll_rtc.h.

2073 {
2074  MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU),
2075  (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)));
2076 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetMask()

__STATIC_INLINE void LL_RTC_ALMA_SetMask ( RTC_TypeDef *  RTCx,
uint32_t  Mask 
)

Specify the Alarm A masks. RTC_ALRMAR MSK4 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK3 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK2 LL_RTC_ALMA_SetMask
RTC_ALRMAR MSK1 LL_RTC_ALMA_SetMask.

Parameters
RTCxRTC Instance
MaskThis parameter can be a combination of the following values:
  • LL_RTC_ALMA_MASK_NONE
  • LL_RTC_ALMA_MASK_DATEWEEKDAY
  • LL_RTC_ALMA_MASK_HOURS
  • LL_RTC_ALMA_MASK_MINUTES
  • LL_RTC_ALMA_MASK_SECONDS
  • LL_RTC_ALMA_MASK_ALL
Return values
None

Definition at line 1924 of file stm32l4xx_ll_rtc.h.

1925 {
1926  MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1, Mask);
1927 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetMinute()

__STATIC_INLINE void LL_RTC_ALMA_SetMinute ( RTC_TypeDef *  RTCx,
uint32_t  Minutes 
)

Set ALARM A Minutes in BCD format.

Note
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format RTC_ALRMAR MNT LL_RTC_ALMA_SetMinute
RTC_ALRMAR MNU LL_RTC_ALMA_SetMinute
Parameters
RTCxRTC Instance
MinutesValue between Min_Data=0x00 and Max_Data=0x59
Return values
None

Definition at line 2100 of file stm32l4xx_ll_rtc.h.

2101 {
2102  MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU),
2103  (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)));
2104 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetSecond()

__STATIC_INLINE void LL_RTC_ALMA_SetSecond ( RTC_TypeDef *  RTCx,
uint32_t  Seconds 
)

Set ALARM A Seconds in BCD format.

Note
helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format RTC_ALRMAR ST LL_RTC_ALMA_SetSecond
RTC_ALRMAR SU LL_RTC_ALMA_SetSecond
Parameters
RTCxRTC Instance
SecondsValue between Min_Data=0x00 and Max_Data=0x59
Return values
None

Definition at line 2128 of file stm32l4xx_ll_rtc.h.

2129 {
2130  MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU),
2131  (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos)));
2132 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetSubSecond()

__STATIC_INLINE void LL_RTC_ALMA_SetSubSecond ( RTC_TypeDef *  RTCx,
uint32_t  Subsecond 
)

Set Alarm A Sub seconds value RCT_ALRMASSR SS LL_RTC_ALMA_SetSubSecond.

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

Definition at line 2226 of file stm32l4xx_ll_rtc.h.

2227 {
2228  MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_SS, Subsecond);
2229 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetSubSecondMask()

__STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask ( RTC_TypeDef *  RTCx,
uint32_t  Mask 
)

Set Alarm A Mask the most-significant bits starting at this bit.

Note
This register can be written only when ALRAE is reset in RTC_CR register, or in initialization mode. RTC_ALRMASSR MASKSS LL_RTC_ALMA_SetSubSecondMask
Parameters
RTCxRTC Instance
MaskValue between Min_Data=0x00 and Max_Data=0xF
Return values
None

Definition at line 2203 of file stm32l4xx_ll_rtc.h.

2204 {
2205  MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_ALRMASSR_MASKSS_Pos);
2206 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetTimeFormat()

__STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat ( RTC_TypeDef *  RTCx,
uint32_t  TimeFormat 
)

Set Alarm A time format (AM/24-hour or PM notation) RTC_ALRMAR PM LL_RTC_ALMA_SetTimeFormat.

Parameters
RTCxRTC Instance
TimeFormatThis parameter can be one of the following values:
  • LL_RTC_ALMA_TIME_FORMAT_AM
  • LL_RTC_ALMA_TIME_FORMAT_PM
Return values
None

Definition at line 2045 of file stm32l4xx_ll_rtc.h.

2046 {
2047  MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM, TimeFormat);
2048 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_ALMA_SetWeekDay()

__STATIC_INLINE void LL_RTC_ALMA_SetWeekDay ( RTC_TypeDef *  RTCx,
uint32_t  WeekDay 
)

Set ALARM A Weekday RTC_ALRMAR DU LL_RTC_ALMA_SetWeekDay.

Parameters
RTCxRTC Instance
WeekDayThis parameter can be one of the following values:
  • LL_RTC_WEEKDAY_MONDAY
  • LL_RTC_WEEKDAY_TUESDAY
  • LL_RTC_WEEKDAY_WEDNESDAY
  • LL_RTC_WEEKDAY_THURSDAY
  • LL_RTC_WEEKDAY_FRIDAY
  • LL_RTC_WEEKDAY_SATURDAY
  • LL_RTC_WEEKDAY_SUNDAY
Return values
None

Definition at line 2013 of file stm32l4xx_ll_rtc.h.

2014 {
2015  MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_ALRMAR_DU_Pos);
2016 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)