STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RTC_TS_EnableInternalEvent (RTC_TypeDef *RTCx)
 Enable internal event timestamp. More...
 
__STATIC_INLINE void LL_RTC_TS_DisableInternalEvent (RTC_TypeDef *RTCx)
 Disable internal event timestamp. More...
 
__STATIC_INLINE void LL_RTC_TS_Enable (RTC_TypeDef *RTCx)
 Enable Timestamp. More...
 
__STATIC_INLINE void LL_RTC_TS_Disable (RTC_TypeDef *RTCx)
 Disable Timestamp. More...
 
__STATIC_INLINE void LL_RTC_TS_SetActiveEdge (RTC_TypeDef *RTCx, uint32_t Edge)
 Set Time-stamp event active edge. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge (RTC_TypeDef *RTCx)
 Get Time-stamp event active edge. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat (RTC_TypeDef *RTCx)
 Get Timestamp AM/PM notation (AM or 24-hour format) RTC_TSTR PM LL_RTC_TS_GetTimeFormat. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetHour (RTC_TypeDef *RTCx)
 Get Timestamp Hours in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetMinute (RTC_TypeDef *RTCx)
 Get Timestamp Minutes in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetSecond (RTC_TypeDef *RTCx)
 Get Timestamp Seconds in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetTime (RTC_TypeDef *RTCx)
 Get Timestamp time (hour, minute and second) in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay (RTC_TypeDef *RTCx)
 Get Timestamp Week day RTC_TSDR WDU LL_RTC_TS_GetWeekDay. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetMonth (RTC_TypeDef *RTCx)
 Get Timestamp Month in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetDay (RTC_TypeDef *RTCx)
 Get Timestamp Day in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetDate (RTC_TypeDef *RTCx)
 Get Timestamp date (WeekDay, Day and Month) in BCD format. More...
 
__STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond (RTC_TypeDef *RTCx)
 Get time-stamp sub second value RTC_TSDR SS LL_RTC_TS_GetSubSecond. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_TS_Disable()

__STATIC_INLINE void LL_RTC_TS_Disable ( RTC_TypeDef *  RTCx)

Disable Timestamp.

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

Definition at line 2659 of file stm32l4xx_ll_rtc.h.

2660 {
2661  CLEAR_BIT(RTCx->CR, RTC_CR_TSE);
2662 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_TS_DisableInternalEvent()

__STATIC_INLINE void LL_RTC_TS_DisableInternalEvent ( RTC_TypeDef *  RTCx)

Disable internal event timestamp.

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

Definition at line 2635 of file stm32l4xx_ll_rtc.h.

2636 {
2637  CLEAR_BIT(RTCx->CR, RTC_CR_ITSE);
2638 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_TS_Enable()

__STATIC_INLINE void LL_RTC_TS_Enable ( RTC_TypeDef *  RTCx)

Enable Timestamp.

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

Definition at line 2647 of file stm32l4xx_ll_rtc.h.

2648 {
2649  SET_BIT(RTCx->CR, RTC_CR_TSE);
2650 }

◆ LL_RTC_TS_EnableInternalEvent()

__STATIC_INLINE void LL_RTC_TS_EnableInternalEvent ( RTC_TypeDef *  RTCx)

Enable internal event timestamp.

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

Definition at line 2623 of file stm32l4xx_ll_rtc.h.

2624 {
2625  SET_BIT(RTCx->CR, RTC_CR_ITSE);
2626 }

◆ LL_RTC_TS_GetActiveEdge()

__STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge ( RTC_TypeDef *  RTCx)

Get Time-stamp event active edge.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before. RTC_CR ITSEDGE LL_RTC_TS_GetActiveEdge
Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_TIMESTAMP_EDGE_RISING
  • LL_RTC_TIMESTAMP_EDGE_FALLING

Definition at line 2689 of file stm32l4xx_ll_rtc.h.

2690 {
2691  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TSEDGE));
2692 }

◆ LL_RTC_TS_GetDate()

__STATIC_INLINE uint32_t LL_RTC_TS_GetDate ( RTC_TypeDef *  RTCx)

Get Timestamp date (WeekDay, Day and Month) in BCD format.

Note
helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_MONTH, and __LL_RTC_GET_DAY are available to get independently each parameter. RTC_TSDR WDU LL_RTC_TS_GetDate
RTC_TSDR MT LL_RTC_TS_GetDate
RTC_TSDR MU LL_RTC_TS_GetDate
RTC_TSDR DT LL_RTC_TS_GetDate
RTC_TSDR DU LL_RTC_TS_GetDate
Parameters
RTCxRTC Instance
Return values
Combinationof Weekday, Day and Month

Definition at line 2833 of file stm32l4xx_ll_rtc.h.

2834 {
2835  return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU | RTC_TSDR_MT | RTC_TSDR_MU | RTC_TSDR_DT | RTC_TSDR_DU));
2836 }

◆ LL_RTC_TS_GetDay()

__STATIC_INLINE uint32_t LL_RTC_TS_GetDay ( RTC_TypeDef *  RTCx)

Get Timestamp Day in BCD format.

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

Definition at line 2816 of file stm32l4xx_ll_rtc.h.

2817 {
2818  return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_DT | RTC_TSDR_DU));
2819 }

◆ LL_RTC_TS_GetHour()

__STATIC_INLINE uint32_t LL_RTC_TS_GetHour ( RTC_TypeDef *  RTCx)

Get Timestamp Hours in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format RTC_TSTR HT LL_RTC_TS_GetHour
RTC_TSTR HU LL_RTC_TS_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 2715 of file stm32l4xx_ll_rtc.h.

2716 {
2717  return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_TSTR_HU_Pos);
2718 }

◆ LL_RTC_TS_GetMinute()

__STATIC_INLINE uint32_t LL_RTC_TS_GetMinute ( RTC_TypeDef *  RTCx)

Get Timestamp Minutes in BCD format.

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

Definition at line 2728 of file stm32l4xx_ll_rtc.h.

2729 {
2730  return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_TSTR_MNU_Pos);
2731 }

◆ LL_RTC_TS_GetMonth()

__STATIC_INLINE uint32_t LL_RTC_TS_GetMonth ( RTC_TypeDef *  RTCx)

Get Timestamp Month in BCD format.

Note
helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format RTC_TSDR MT LL_RTC_TS_GetMonth
RTC_TSDR MU LL_RTC_TS_GetMonth
Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_MONTH_JANUARY
  • LL_RTC_MONTH_FEBRUARY
  • LL_RTC_MONTH_MARCH
  • LL_RTC_MONTH_APRIL
  • LL_RTC_MONTH_MAY
  • LL_RTC_MONTH_JUNE
  • LL_RTC_MONTH_JULY
  • LL_RTC_MONTH_AUGUST
  • LL_RTC_MONTH_SEPTEMBER
  • LL_RTC_MONTH_OCTOBER
  • LL_RTC_MONTH_NOVEMBER
  • LL_RTC_MONTH_DECEMBER

Definition at line 2803 of file stm32l4xx_ll_rtc.h.

2804 {
2805  return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_TSDR_MU_Pos);
2806 }

◆ LL_RTC_TS_GetSecond()

__STATIC_INLINE uint32_t LL_RTC_TS_GetSecond ( RTC_TypeDef *  RTCx)

Get Timestamp Seconds in BCD format.

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

Definition at line 2741 of file stm32l4xx_ll_rtc.h.

2742 {
2743  return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_ST | RTC_TSTR_SU));
2744 }

◆ LL_RTC_TS_GetSubSecond()

__STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond ( RTC_TypeDef *  RTCx)

Get time-stamp sub second value RTC_TSDR SS LL_RTC_TS_GetSubSecond.

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

Definition at line 2844 of file stm32l4xx_ll_rtc.h.

2845 {
2846  return (uint32_t)(READ_BIT(RTCx->TSSSR, RTC_TSSSR_SS));
2847 }

◆ LL_RTC_TS_GetTime()

__STATIC_INLINE uint32_t LL_RTC_TS_GetTime ( RTC_TypeDef *  RTCx)

Get Timestamp 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_TSTR HT LL_RTC_TS_GetTime
RTC_TSTR HU LL_RTC_TS_GetTime
RTC_TSTR MNT LL_RTC_TS_GetTime
RTC_TSTR MNU LL_RTC_TS_GetTime
RTC_TSTR ST LL_RTC_TS_GetTime
RTC_TSTR SU LL_RTC_TS_GetTime
Parameters
RTCxRTC Instance
Return values
Combinationof hours, minutes and seconds.

Definition at line 2759 of file stm32l4xx_ll_rtc.h.

2760 {
2761  return (uint32_t)(READ_BIT(RTCx->TSTR,
2762  RTC_TSTR_HT | RTC_TSTR_HU | RTC_TSTR_MNT | RTC_TSTR_MNU | RTC_TSTR_ST | RTC_TSTR_SU));
2763 }

◆ LL_RTC_TS_GetTimeFormat()

__STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat ( RTC_TypeDef *  RTCx)

Get Timestamp AM/PM notation (AM or 24-hour format) RTC_TSTR PM LL_RTC_TS_GetTimeFormat.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_TS_TIME_FORMAT_AM
  • LL_RTC_TS_TIME_FORMAT_PM

Definition at line 2702 of file stm32l4xx_ll_rtc.h.

2703 {
2704  return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_PM));
2705 }

◆ LL_RTC_TS_GetWeekDay()

__STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay ( RTC_TypeDef *  RTCx)

Get Timestamp Week day RTC_TSDR WDU LL_RTC_TS_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 2778 of file stm32l4xx_ll_rtc.h.

2779 {
2780  return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_TSDR_WDU_Pos);
2781 }

◆ LL_RTC_TS_SetActiveEdge()

__STATIC_INLINE void LL_RTC_TS_SetActiveEdge ( RTC_TypeDef *  RTCx,
uint32_t  Edge 
)

Set Time-stamp event active edge.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
TSE must be reset when TSEDGE is changed to avoid unwanted TSF setting RTC_CR ITSEDGE LL_RTC_TS_SetActiveEdge
Parameters
RTCxRTC Instance
EdgeThis parameter can be one of the following values:
  • LL_RTC_TIMESTAMP_EDGE_RISING
  • LL_RTC_TIMESTAMP_EDGE_FALLING
Return values
None

Definition at line 2675 of file stm32l4xx_ll_rtc.h.

2676 {
2677  MODIFY_REG(RTCx->CR, RTC_CR_TSEDGE, Edge);
2678 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)