STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Enumerations | Functions
stm32f7xx_hal_rtc.h File Reference

Header file of RTC HAL module. More...

#include "stm32f7xx_hal_def.h"
#include "stm32f7xx_hal_rtc_ex.h"

Go to the source code of this file.

Data Structures

struct  RTC_InitTypeDef
 RTC Configuration Structure definition. More...
 
struct  RTC_TimeTypeDef
 RTC Time structure definition. More...
 
struct  RTC_DateTypeDef
 RTC Date structure definition. More...
 
struct  RTC_AlarmTypeDef
 RTC Alarm structure definition. More...
 
struct  RTC_HandleTypeDef
 RTC Handle Structure definition. More...
 

Macros

#define RTC_HOURFORMAT_24   ((uint32_t)0x00000000U)
 
#define RTC_HOURFORMAT_12   ((uint32_t)0x00000040U)
 
#define RTC_OUTPUT_POLARITY_HIGH   ((uint32_t)0x00000000U)
 
#define RTC_OUTPUT_POLARITY_LOW   ((uint32_t)0x00100000U)
 
#define RTC_OUTPUT_TYPE_OPENDRAIN   ((uint32_t)0x00000000U)
 
#define RTC_OUTPUT_TYPE_PUSHPULL   ((uint32_t)RTC_OR_ALARMTYPE) /* 0x00000008 */
 
#define RTC_HOURFORMAT12_AM   ((uint8_t)0x00U)
 
#define RTC_HOURFORMAT12_PM   ((uint8_t)0x40U)
 
#define RTC_DAYLIGHTSAVING_SUB1H   ((uint32_t)0x00020000U)
 
#define RTC_DAYLIGHTSAVING_ADD1H   ((uint32_t)0x00010000U)
 
#define RTC_DAYLIGHTSAVING_NONE   ((uint32_t)0x00000000U)
 
#define RTC_STOREOPERATION_RESET   ((uint32_t)0x00000000U)
 
#define RTC_STOREOPERATION_SET   ((uint32_t)0x00040000U)
 
#define RTC_FORMAT_BIN   ((uint32_t)0x00000000U)
 
#define RTC_FORMAT_BCD   ((uint32_t)0x00000001U)
 
#define RTC_MONTH_JANUARY   ((uint8_t)0x01U)
 
#define RTC_MONTH_FEBRUARY   ((uint8_t)0x02U)
 
#define RTC_MONTH_MARCH   ((uint8_t)0x03U)
 
#define RTC_MONTH_APRIL   ((uint8_t)0x04U)
 
#define RTC_MONTH_MAY   ((uint8_t)0x05U)
 
#define RTC_MONTH_JUNE   ((uint8_t)0x06U)
 
#define RTC_MONTH_JULY   ((uint8_t)0x07U)
 
#define RTC_MONTH_AUGUST   ((uint8_t)0x08U)
 
#define RTC_MONTH_SEPTEMBER   ((uint8_t)0x09U)
 
#define RTC_MONTH_OCTOBER   ((uint8_t)0x10U)
 
#define RTC_MONTH_NOVEMBER   ((uint8_t)0x11U)
 
#define RTC_MONTH_DECEMBER   ((uint8_t)0x12U)
 
#define RTC_WEEKDAY_MONDAY   ((uint8_t)0x01U)
 
#define RTC_WEEKDAY_TUESDAY   ((uint8_t)0x02U)
 
#define RTC_WEEKDAY_WEDNESDAY   ((uint8_t)0x03U)
 
#define RTC_WEEKDAY_THURSDAY   ((uint8_t)0x04U)
 
#define RTC_WEEKDAY_FRIDAY   ((uint8_t)0x05U)
 
#define RTC_WEEKDAY_SATURDAY   ((uint8_t)0x06U)
 
#define RTC_WEEKDAY_SUNDAY   ((uint8_t)0x07U)
 
#define RTC_ALARMDATEWEEKDAYSEL_DATE   ((uint32_t)0x00000000U)
 
#define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY   ((uint32_t)0x40000000U)
 
#define RTC_ALARMMASK_NONE   ((uint32_t)0x00000000U)
 
#define RTC_ALARMMASK_DATEWEEKDAY   RTC_ALRMAR_MSK4
 
#define RTC_ALARMMASK_HOURS   RTC_ALRMAR_MSK3
 
#define RTC_ALARMMASK_MINUTES   RTC_ALRMAR_MSK2
 
#define RTC_ALARMMASK_SECONDS   RTC_ALRMAR_MSK1
 
#define RTC_ALARMMASK_ALL   ((uint32_t)0x80808080U)
 
#define RTC_ALARM_A   RTC_CR_ALRAE
 
#define RTC_ALARM_B   RTC_CR_ALRBE
 
#define RTC_ALARMSUBSECONDMASK_ALL   ((uint32_t)0x00000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_1   ((uint32_t)0x01000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_2   ((uint32_t)0x02000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_3   ((uint32_t)0x03000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_4   ((uint32_t)0x04000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_5   ((uint32_t)0x05000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_6   ((uint32_t)0x06000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_7   ((uint32_t)0x07000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_8   ((uint32_t)0x08000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_9   ((uint32_t)0x09000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_10   ((uint32_t)0x0A000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_11   ((uint32_t)0x0B000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_12   ((uint32_t)0x0C000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14_13   ((uint32_t)0x0D000000U)
 
#define RTC_ALARMSUBSECONDMASK_SS14   ((uint32_t)0x0E000000U)
 
#define RTC_ALARMSUBSECONDMASK_NONE   ((uint32_t)0x0F000000U)
 
#define RTC_IT_TS   ((uint32_t)RTC_CR_TSIE)
 
#define RTC_IT_WUT   ((uint32_t)RTC_CR_WUTIE)
 
#define RTC_IT_ALRA   ((uint32_t)RTC_CR_ALRAIE)
 
#define RTC_IT_ALRB   ((uint32_t)RTC_CR_ALRBIE)
 
#define RTC_IT_TAMP   ((uint32_t)RTC_TAMPCR_TAMPIE) /* Used only to Enable the Tamper Interrupt */
 
#define RTC_IT_TAMP1   ((uint32_t)RTC_TAMPCR_TAMP1IE)
 
#define RTC_IT_TAMP2   ((uint32_t)RTC_TAMPCR_TAMP2IE)
 
#define RTC_IT_TAMP3   ((uint32_t)RTC_TAMPCR_TAMP3IE)
 
#define RTC_FLAG_RECALPF   ((uint32_t)RTC_ISR_RECALPF)
 
#define RTC_FLAG_TAMP3F   ((uint32_t)RTC_ISR_TAMP3F)
 
#define RTC_FLAG_TAMP2F   ((uint32_t)RTC_ISR_TAMP2F)
 
#define RTC_FLAG_TAMP1F   ((uint32_t)RTC_ISR_TAMP1F)
 
#define RTC_FLAG_TSOVF   ((uint32_t)RTC_ISR_TSOVF)
 
#define RTC_FLAG_TSF   ((uint32_t)RTC_ISR_TSF)
 
#define RTC_FLAG_ITSF   ((uint32_t)RTC_ISR_ITSF)
 
#define RTC_FLAG_WUTF   ((uint32_t)RTC_ISR_WUTF)
 
#define RTC_FLAG_ALRBF   ((uint32_t)RTC_ISR_ALRBF)
 
#define RTC_FLAG_ALRAF   ((uint32_t)RTC_ISR_ALRAF)
 
#define RTC_FLAG_INITF   ((uint32_t)RTC_ISR_INITF)
 
#define RTC_FLAG_RSF   ((uint32_t)RTC_ISR_RSF)
 
#define RTC_FLAG_INITS   ((uint32_t)RTC_ISR_INITS)
 
#define RTC_FLAG_SHPF   ((uint32_t)RTC_ISR_SHPF)
 
#define RTC_FLAG_WUTWF   ((uint32_t)RTC_ISR_WUTWF)
 
#define RTC_FLAG_ALRBWF   ((uint32_t)RTC_ISR_ALRBWF)
 
#define RTC_FLAG_ALRAWF   ((uint32_t)RTC_ISR_ALRAWF)
 
#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_RTC_STATE_RESET)
 Reset RTC handle state. More...
 
#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__)
 Disable the write protection for RTC registers. More...
 
#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__)
 Enable the write protection for RTC registers. More...
 
#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
 Enable the RTC ALARMA peripheral. More...
 
#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
 Disable the RTC ALARMA peripheral. More...
 
#define __HAL_RTC_ALARMB_ENABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))
 Enable the RTC ALARMB peripheral. More...
 
#define __HAL_RTC_ALARMB_DISABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))
 Disable the RTC ALARMB peripheral. More...
 
#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__)    ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
 Enable the RTC Alarm interrupt. More...
 
#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__)    ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
 Disable the RTC Alarm interrupt. More...
 
#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__)    ((((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4)) & 0x0000FFFF) != RESET)? SET : RESET)
 Check whether the specified RTC Alarm interrupt has occurred or not. More...
 
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__)    (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)
 Get the selected RTC Alarm's flag status. More...
 
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__)    ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
 Clear the RTC Alarm's pending flags. More...
 
#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)    (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
 Check whether the specified RTC Alarm interrupt has been enabled or not. More...
 
#define __HAL_RTC_ALARM_EXTI_ENABLE_IT()    (EXTI->IMR |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable interrupt on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_DISABLE_IT()    (EXTI->IMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable interrupt on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT()    (EXTI->EMR |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable event on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT()    (EXTI->EMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable event on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE()    (EXTI->FTSR |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable falling edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE()   (EXTI->FTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable falling edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE()    (EXTI->RTSR |= RTC_EXTI_LINE_ALARM_EVENT)
 Enable rising edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE()    (EXTI->RTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))
 Disable rising edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE()   __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE();
 Enable rising & falling edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE()   __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE();
 Disable rising & falling edge trigger on the RTC Alarm associated Exti line. More...
 
#define __HAL_RTC_ALARM_EXTI_GET_FLAG()    (EXTI->PR & RTC_EXTI_LINE_ALARM_EVENT)
 Check whether the RTC Alarm associated Exti line interrupt flag is set or not. More...
 
#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG()    (EXTI->PR = RTC_EXTI_LINE_ALARM_EVENT)
 Clear the RTC Alarm associated Exti line flag. More...
 
#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT()    (EXTI->SWIER |= RTC_EXTI_LINE_ALARM_EVENT)
 Generate a Software interrupt on RTC Alarm associated Exti line. More...
 
#define RTC_TR_RESERVED_MASK   ((uint32_t)0x007F7F7FU)
 
#define RTC_DR_RESERVED_MASK   ((uint32_t)0x00FFFF3FU)
 
#define RTC_INIT_MASK   ((uint32_t)0xFFFFFFFFU)
 
#define RTC_RSF_MASK   ((uint32_t)0xFFFFFF5FU)
 
#define RTC_TIMEOUT_VALUE   1000
 
#define RTC_EXTI_LINE_ALARM_EVENT   ((uint32_t)EXTI_IMR_IM17)
 
#define IS_RTC_HOUR_FORMAT(__FORMAT__)
 
#define IS_RTC_OUTPUT_POL(__POL__)
 
#define IS_RTC_OUTPUT_TYPE(__TYPE__)
 
#define IS_RTC_ASYNCH_PREDIV(__PREDIV__)    ((__PREDIV__) <= (uint32_t)0x7F)
 
#define IS_RTC_SYNCH_PREDIV(__PREDIV__)    ((__PREDIV__) <= (uint32_t)0x7FFF)
 
#define IS_RTC_HOUR12(__HOUR__)    (((__HOUR__) > (uint32_t)0) && ((__HOUR__) <= (uint32_t)12))
 
#define IS_RTC_HOUR24(__HOUR__)    ((__HOUR__) <= (uint32_t)23)
 
#define IS_RTC_MINUTES(__MINUTES__)    ((__MINUTES__) <= (uint32_t)59)
 
#define IS_RTC_SECONDS(__SECONDS__)    ((__SECONDS__) <= (uint32_t)59)
 
#define IS_RTC_HOURFORMAT12(__PM__)   (((__PM__) == RTC_HOURFORMAT12_AM) || ((__PM__) == RTC_HOURFORMAT12_PM))
 
#define IS_RTC_DAYLIGHT_SAVING(__SAVE__)
 
#define IS_RTC_STORE_OPERATION(__OPERATION__)
 
#define IS_RTC_FORMAT(__FORMAT__)   (((__FORMAT__) == RTC_FORMAT_BIN) || ((__FORMAT__) == RTC_FORMAT_BCD))
 
#define IS_RTC_YEAR(__YEAR__)    ((__YEAR__) <= (uint32_t)99)
 
#define IS_RTC_MONTH(__MONTH__)    (((__MONTH__) >= (uint32_t)1) && ((__MONTH__) <= (uint32_t)12))
 
#define IS_RTC_DATE(__DATE__)    (((__DATE__) >= (uint32_t)1) && ((__DATE__) <= (uint32_t)31))
 
#define IS_RTC_WEEKDAY(__WEEKDAY__)
 
#define IS_RTC_ALARM_DATE_WEEKDAY_DATE(__DATE__)   (((__DATE__) >(uint32_t) 0) && ((__DATE__) <= (uint32_t)31))
 
#define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(__WEEKDAY__)
 
#define IS_RTC_ALARM_DATE_WEEKDAY_SEL(__SEL__)
 
#define IS_RTC_ALARM_MASK(__MASK__)   (((__MASK__) & 0x7F7F7F7F) == (uint32_t)RESET)
 
#define IS_RTC_ALARM(__ALARM__)    (((__ALARM__) == RTC_ALARM_A) || ((__ALARM__) == RTC_ALARM_B))
 
#define IS_RTC_ALARM_SUB_SECOND_VALUE(__VALUE__)   ((__VALUE__) <= (uint32_t)0x00007FFF)
 
#define IS_RTC_ALARM_SUB_SECOND_MASK(__MASK__)
 

Enumerations

enum  HAL_RTCStateTypeDef {
  HAL_RTC_STATE_RESET = 0x00U, HAL_RTC_STATE_READY = 0x01U, HAL_RTC_STATE_BUSY = 0x02U, HAL_RTC_STATE_TIMEOUT = 0x03U,
  HAL_RTC_STATE_ERROR = 0x04U
}
 HAL State structures definition. More...
 

Functions

HAL_StatusTypeDef HAL_RTC_Init (RTC_HandleTypeDef *hrtc)
 
HAL_StatusTypeDef HAL_RTC_DeInit (RTC_HandleTypeDef *hrtc)
 
void HAL_RTC_MspInit (RTC_HandleTypeDef *hrtc)
 
void HAL_RTC_MspDeInit (RTC_HandleTypeDef *hrtc)
 
HAL_StatusTypeDef HAL_RTC_SetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_GetTime (RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_SetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_GetDate (RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_SetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_SetAlarm_IT (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format)
 
HAL_StatusTypeDef HAL_RTC_DeactivateAlarm (RTC_HandleTypeDef *hrtc, uint32_t Alarm)
 
HAL_StatusTypeDef HAL_RTC_GetAlarm (RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format)
 
void HAL_RTC_AlarmIRQHandler (RTC_HandleTypeDef *hrtc)
 
HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent (RTC_HandleTypeDef *hrtc, uint32_t Timeout)
 
void HAL_RTC_AlarmAEventCallback (RTC_HandleTypeDef *hrtc)
 ALARM A Event Callback in non blocking mode. More...
 
HAL_StatusTypeDef HAL_RTC_WaitForSynchro (RTC_HandleTypeDef *hrtc)
 
HAL_RTCStateTypeDef HAL_RTC_GetState (RTC_HandleTypeDef *hrtc)
 
HAL_StatusTypeDef RTC_EnterInitMode (RTC_HandleTypeDef *hrtc)
 
uint8_t RTC_ByteToBcd2 (uint8_t Value)
 
uint8_t RTC_Bcd2ToByte (uint8_t Value)
 

Detailed Description

Header file of RTC HAL module.

Author
MCD Application Team
Version
V1.1.0
Date
22-April-2016
Attention

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32f7xx_hal_rtc.h.