STM32L486xx HAL User Manual
Defines
RTC Exported Macros
RTC

Defines

#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__)
 Reset RTC handle state.
#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__)
 Disable the write protection for RTC registers.
#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__)
 Enable the write protection for RTC registers.
#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
 Enable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
 Disable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARMB_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))
 Enable the RTC ALARMB peripheral.
#define __HAL_RTC_ALARMB_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))
 Disable the RTC ALARMB peripheral.
#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
 Enable the RTC Alarm interrupt.
#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
 Disable the RTC Alarm interrupt.
#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__)   (((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)
 Check whether the specified RTC Alarm interrupt has occurred or not.
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__)   (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
 Get the selected RTC Alarm's flag status.
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
 Clear the RTC Alarm's pending flags.
#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
 Check whether the specified RTC Alarm interrupt is enabled or not.
#define __HAL_RTC_ALARM_EXTI_ENABLE_IT()   (EXTI->IMR1 |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable interrupt on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_IT()   (EXTI->IMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable interrupt on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT()   (EXTI->EMR1 |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable event on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT()   (EXTI->EMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable event on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE()   (EXTI->FTSR1 |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable falling edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE()   (EXTI->FTSR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable falling edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE()   (EXTI->RTSR1 |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable rising edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE()   (EXTI->RTSR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable rising edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable rising & falling edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable rising & falling edge trigger on the RTC Alarm associated Exti line.
#define __HAL_RTC_ALARM_EXTI_GET_FLAG()   (EXTI->PR1 & RTC_EXTI_LINE_ALARM_EVENT)
 Check whether the RTC Alarm associated Exti line interrupt flag is set or not.
#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG()   (EXTI->PR1 = RTC_EXTI_LINE_ALARM_EVENT)
 Clear the RTC Alarm associated Exti line flag.
#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT()   (EXTI->SWIER1 |= RTC_EXTI_LINE_ALARM_EVENT)
 Generate a Software interrupt on RTC Alarm associated Exti line.

Define Documentation

#define __HAL_RTC_ALARM_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

Clear the RTC Alarm's pending flags.

Parameters:
__HANDLE__,:specifies the RTC handle.
__FLAG__,:specifies the RTC Alarm Flag sources to clear. This parameter can be:
  • RTC_FLAG_ALRAF
  • RTC_FLAG_ALRBF
Return values:
None

Definition at line 601 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_AlarmIRQHandler(), HAL_RTC_PollForAlarmAEvent(), HAL_RTC_SetAlarm_IT(), and HAL_RTCEx_PollForAlarmBEvent().

#define __HAL_RTC_ALARM_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

Disable the RTC Alarm interrupt.

Parameters:
__HANDLE__,:specifies the RTC handle.
__INTERRUPT__,:specifies the RTC Alarm interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values:
None

Definition at line 566 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_DeactivateAlarm(), and HAL_RTC_SetAlarm().

#define __HAL_RTC_ALARM_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

Enable the RTC Alarm interrupt.

Parameters:
__HANDLE__,:specifies the RTC handle.
__INTERRUPT__,:specifies the RTC Alarm interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values:
None

Definition at line 555 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_SetAlarm_IT().

Clear the RTC Alarm associated Exti line flag.

Return values:
None

Definition at line 690 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_AlarmIRQHandler().

#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT ( )    (EXTI->EMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))

Disable event on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 636 of file stm32l4xx_hal_rtc.h.

Disable falling edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 648 of file stm32l4xx_hal_rtc.h.

#define __HAL_RTC_ALARM_EXTI_DISABLE_IT ( )    (EXTI->IMR1 &= ~(RTC_EXTI_LINE_ALARM_EVENT))

Disable interrupt on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 624 of file stm32l4xx_hal_rtc.h.

Disable rising edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 660 of file stm32l4xx_hal_rtc.h.

Value:
do { \
                                                             __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE();  \
                                                             __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE(); \
                                                           } while(0)

Disable rising & falling edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 675 of file stm32l4xx_hal_rtc.h.

Enable event on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 630 of file stm32l4xx_hal_rtc.h.

Enable falling edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 642 of file stm32l4xx_hal_rtc.h.

#define __HAL_RTC_ALARM_EXTI_ENABLE_IT ( )    (EXTI->IMR1 |= RTC_EXTI_LINE_ALARM_EVENT)

Enable interrupt on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 618 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_SetAlarm_IT().

Enable rising edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 654 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_SetAlarm_IT().

Value:
do { \
                                                             __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE();  \
                                                             __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE(); \
                                                           } while(0)

Enable rising & falling edge trigger on the RTC Alarm associated Exti line.

Return values:
None

Definition at line 666 of file stm32l4xx_hal_rtc.h.

Generate a Software interrupt on RTC Alarm associated Exti line.

Return values:
None

Definition at line 696 of file stm32l4xx_hal_rtc.h.

Check whether the RTC Alarm associated Exti line interrupt flag is set or not.

Return values:
LineStatus.

Definition at line 684 of file stm32l4xx_hal_rtc.h.

#define __HAL_RTC_ALARM_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

Get the selected RTC Alarm's flag status.

Parameters:
__HANDLE__,:specifies the RTC handle.
__FLAG__,:specifies the RTC Alarm Flag sources to check. This parameter can be:
  • RTC_FLAG_ALRAF
  • RTC_FLAG_ALRBF
  • RTC_FLAG_ALRAWF
  • RTC_FLAG_ALRBWF
Return values:
None

Definition at line 590 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_AlarmIRQHandler(), HAL_RTC_DeactivateAlarm(), HAL_RTC_PollForAlarmAEvent(), HAL_RTC_SetAlarm(), HAL_RTC_SetAlarm_IT(), and HAL_RTCEx_PollForAlarmBEvent().

#define __HAL_RTC_ALARM_GET_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)

Check whether the specified RTC Alarm interrupt has occurred or not.

Parameters:
__HANDLE__,:specifies the RTC handle.
__INTERRUPT__,:specifies the RTC Alarm interrupt sources to check. This parameter can be:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values:
None

Definition at line 577 of file stm32l4xx_hal_rtc.h.

#define __HAL_RTC_ALARM_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)

Check whether the specified RTC Alarm interrupt is enabled or not.

Parameters:
__HANDLE__,:specifies the RTC handle.
__INTERRUPT__,:specifies the RTC Alarm interrupt sources to check. This parameter can be:
  • RTC_IT_ALRA: Alarm A interrupt
  • RTC_IT_ALRB: Alarm B interrupt
Return values:
None

Definition at line 612 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_AlarmIRQHandler().

#define __HAL_RTC_ALARMA_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))

Disable the RTC ALARMA peripheral.

Parameters:
__HANDLE__,:specifies the RTC handle.
Return values:
None

Definition at line 530 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_DeactivateAlarm(), HAL_RTC_SetAlarm(), and HAL_RTC_SetAlarm_IT().

#define __HAL_RTC_ALARMA_ENABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))

Enable the RTC ALARMA peripheral.

Parameters:
__HANDLE__,:specifies the RTC handle.
Return values:
None

Definition at line 523 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_SetAlarm(), and HAL_RTC_SetAlarm_IT().

#define __HAL_RTC_ALARMB_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))

Disable the RTC ALARMB peripheral.

Parameters:
__HANDLE__,:specifies the RTC handle.
Return values:
None

Definition at line 544 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_DeactivateAlarm(), HAL_RTC_SetAlarm(), and HAL_RTC_SetAlarm_IT().

#define __HAL_RTC_ALARMB_ENABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))

Enable the RTC ALARMB peripheral.

Parameters:
__HANDLE__,:specifies the RTC handle.
Return values:
None

Definition at line 537 of file stm32l4xx_hal_rtc.h.

Referenced by HAL_RTC_SetAlarm(), and HAL_RTC_SetAlarm_IT().

#define __HAL_RTC_RESET_HANDLE_STATE (   __HANDLE__)
Value:
do{\
                                                      (__HANDLE__)->State = HAL_RTC_STATE_RESET;\
                                                      (__HANDLE__)->MspInitCallback = NULL;\
                                                      (__HANDLE__)->MspDeInitCallback = NULL;\
                                                     }while(0)

Reset RTC handle state.

Parameters:
__HANDLE__,:RTC handle.
Return values:
None

Definition at line 487 of file stm32l4xx_hal_rtc.h.

#define __HAL_RTC_WRITEPROTECTION_DISABLE (   __HANDLE__)
#define __HAL_RTC_WRITEPROTECTION_ENABLE (   __HANDLE__)