STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RTC_WAKEUP_Enable (RTC_TypeDef *RTCx)
 Enable Wakeup timer. More...
 
__STATIC_INLINE void LL_RTC_WAKEUP_Disable (RTC_TypeDef *RTCx)
 Disable Wakeup timer. More...
 
__STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled (RTC_TypeDef *RTCx)
 Check if Wakeup timer is enabled or not RTC_CR WUTE LL_RTC_WAKEUP_IsEnabled. More...
 
__STATIC_INLINE void LL_RTC_WAKEUP_SetClock (RTC_TypeDef *RTCx, uint32_t WakeupClock)
 Select Wakeup clock. More...
 
__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock (RTC_TypeDef *RTCx)
 Get Wakeup clock RTC_CR WUCKSEL LL_RTC_WAKEUP_GetClock. More...
 
__STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload (RTC_TypeDef *RTCx, uint32_t Value)
 Set Wakeup auto-reload value. More...
 
__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload (RTC_TypeDef *RTCx)
 Get Wakeup auto-reload value RTC_WUTR WUT LL_RTC_WAKEUP_GetAutoReload. More...
 
__STATIC_INLINE void LL_RTC_WAKEUP_SetAutoClr (RTC_TypeDef *RTCx, uint32_t Value)
 Set Wakeup auto-clear value. More...
 
__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoClr (RTC_TypeDef *RTCx)
 Get Wakeup auto-clear value RTC_WUTR WUTOCLR LL_RTC_WAKEUP_GetAutoClr. More...
 

Detailed Description

Function Documentation

◆ LL_RTC_WAKEUP_Disable()

__STATIC_INLINE void LL_RTC_WAKEUP_Disable ( RTC_TypeDef *  RTCx)

Disable Wakeup timer.

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

Definition at line 2877 of file stm32l4xx_ll_rtc.h.

2878 {
2879  CLEAR_BIT(RTCx->CR, RTC_CR_WUTE);
2880 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RTC_WAKEUP_Enable()

__STATIC_INLINE void LL_RTC_WAKEUP_Enable ( RTC_TypeDef *  RTCx)

Enable Wakeup timer.

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

Definition at line 2865 of file stm32l4xx_ll_rtc.h.

2866 {
2867  SET_BIT(RTCx->CR, RTC_CR_WUTE);
2868 }

◆ LL_RTC_WAKEUP_GetAutoClr()

__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoClr ( RTC_TypeDef *  RTCx)

Get Wakeup auto-clear value RTC_WUTR WUTOCLR LL_RTC_WAKEUP_GetAutoClr.

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

Definition at line 2974 of file stm32l4xx_ll_rtc.h.

2975 {
2976  return (uint32_t)((READ_BIT(RTCx->WUTR, RTC_WUTR_WUTOCLR)) >> RTC_WUTR_WUTOCLR_Pos);
2977 }

◆ LL_RTC_WAKEUP_GetAutoReload()

__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload ( RTC_TypeDef *  RTCx)

Get Wakeup auto-reload value RTC_WUTR WUT LL_RTC_WAKEUP_GetAutoReload.

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

Definition at line 2949 of file stm32l4xx_ll_rtc.h.

2950 {
2951  return (uint32_t)(READ_BIT(RTCx->WUTR, RTC_WUTR_WUT));
2952 }

◆ LL_RTC_WAKEUP_GetClock()

__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock ( RTC_TypeDef *  RTCx)

Get Wakeup clock RTC_CR WUCKSEL LL_RTC_WAKEUP_GetClock.

Parameters
RTCxRTC Instance
Return values
Returnedvalue can be one of the following values:
  • LL_RTC_WAKEUPCLOCK_DIV_16
  • LL_RTC_WAKEUPCLOCK_DIV_8
  • LL_RTC_WAKEUPCLOCK_DIV_4
  • LL_RTC_WAKEUPCLOCK_DIV_2
  • LL_RTC_WAKEUPCLOCK_CKSPRE
  • LL_RTC_WAKEUPCLOCK_CKSPRE_WUT

Definition at line 2925 of file stm32l4xx_ll_rtc.h.

2926 {
2927  return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_WUCKSEL));
2928 }

◆ LL_RTC_WAKEUP_IsEnabled()

__STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled ( RTC_TypeDef *  RTCx)

Check if Wakeup timer is enabled or not RTC_CR WUTE LL_RTC_WAKEUP_IsEnabled.

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

Definition at line 2888 of file stm32l4xx_ll_rtc.h.

2889 {
2890  return (READ_BIT(RTCx->CR, RTC_CR_WUTE) == (RTC_CR_WUTE));
2891 }

◆ LL_RTC_WAKEUP_SetAutoClr()

__STATIC_INLINE void LL_RTC_WAKEUP_SetAutoClr ( RTC_TypeDef *  RTCx,
uint32_t  Value 
)

Set Wakeup auto-clear value.

Note
Bit can be written only when WUTWF is set to 1 in RTC_ISR RTC_WUTR WUTOCLR LL_RTC_WAKEUP_SetAutoClr
Parameters
RTCxRTC Instance
ValueValue between Min_Data=0x00 and Max_Data=0xFFFF
Return values
None

Definition at line 2963 of file stm32l4xx_ll_rtc.h.

2964 {
2965  MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUTOCLR, (Value << RTC_WUTR_WUTOCLR_Pos));
2966 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_WAKEUP_SetAutoReload()

__STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload ( RTC_TypeDef *  RTCx,
uint32_t  Value 
)

Set Wakeup auto-reload value.

Note
Bit can be written only when WUTWF is set to 1 in RTC_ISR RTC_WUTR WUT LL_RTC_WAKEUP_SetAutoReload
Parameters
RTCxRTC Instance
ValueValue between Min_Data=0x00 and Max_Data=0xFFFF
Return values
None

Definition at line 2938 of file stm32l4xx_ll_rtc.h.

2939 {
2940  MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUT, Value);
2941 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RTC_WAKEUP_SetClock()

__STATIC_INLINE void LL_RTC_WAKEUP_SetClock ( RTC_TypeDef *  RTCx,
uint32_t  WakeupClock 
)

Select Wakeup clock.

Note
Bit is write-protected. LL_RTC_DisableWriteProtection function should be called before.
Bit can be written only when RTC_CR WUTE bit = 0 and RTC_ISR WUTWF bit = 1 RTC_CR WUCKSEL LL_RTC_WAKEUP_SetClock
Parameters
RTCxRTC Instance
WakeupClockThis parameter can be one of the following values:
  • LL_RTC_WAKEUPCLOCK_DIV_16
  • LL_RTC_WAKEUPCLOCK_DIV_8
  • LL_RTC_WAKEUPCLOCK_DIV_4
  • LL_RTC_WAKEUPCLOCK_DIV_2
  • LL_RTC_WAKEUPCLOCK_CKSPRE
  • LL_RTC_WAKEUPCLOCK_CKSPRE_WUT
Return values
None

Definition at line 2908 of file stm32l4xx_ll_rtc.h.

2909 {
2910  MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock);
2911 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)