stm32f7xx_hal_rtc_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F7xx_HAL_RTC_EX_H
22 #define __STM32F7xx_HAL_RTC_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
47 typedef struct
48 {
49  uint32_t Tamper;
52  uint32_t Interrupt;
55  uint32_t Trigger;
58  uint32_t NoErase;
61  uint32_t MaskFlag;
64  uint32_t Filter;
67  uint32_t SamplingFrequency;
70  uint32_t PrechargeDuration;
73  uint32_t TamperPullUp;
76  uint32_t TimeStampOnTamperDetection;
83 /* Exported constants --------------------------------------------------------*/
91 #define RTC_OUTPUT_DISABLE ((uint32_t)0x00000000U)
92 #define RTC_OUTPUT_ALARMA ((uint32_t)0x00200000U)
93 #define RTC_OUTPUT_ALARMB ((uint32_t)0x00400000U)
94 #define RTC_OUTPUT_WAKEUP ((uint32_t)0x00600000U)
95 
102 #define RTC_BKP_DR0 ((uint32_t)0x00000000U)
103 #define RTC_BKP_DR1 ((uint32_t)0x00000001U)
104 #define RTC_BKP_DR2 ((uint32_t)0x00000002U)
105 #define RTC_BKP_DR3 ((uint32_t)0x00000003U)
106 #define RTC_BKP_DR4 ((uint32_t)0x00000004U)
107 #define RTC_BKP_DR5 ((uint32_t)0x00000005U)
108 #define RTC_BKP_DR6 ((uint32_t)0x00000006U)
109 #define RTC_BKP_DR7 ((uint32_t)0x00000007U)
110 #define RTC_BKP_DR8 ((uint32_t)0x00000008U)
111 #define RTC_BKP_DR9 ((uint32_t)0x00000009U)
112 #define RTC_BKP_DR10 ((uint32_t)0x0000000AU)
113 #define RTC_BKP_DR11 ((uint32_t)0x0000000BU)
114 #define RTC_BKP_DR12 ((uint32_t)0x0000000CU)
115 #define RTC_BKP_DR13 ((uint32_t)0x0000000DU)
116 #define RTC_BKP_DR14 ((uint32_t)0x0000000EU)
117 #define RTC_BKP_DR15 ((uint32_t)0x0000000FU)
118 #define RTC_BKP_DR16 ((uint32_t)0x00000010U)
119 #define RTC_BKP_DR17 ((uint32_t)0x00000011U)
120 #define RTC_BKP_DR18 ((uint32_t)0x00000012U)
121 #define RTC_BKP_DR19 ((uint32_t)0x00000013U)
122 #define RTC_BKP_DR20 ((uint32_t)0x00000014U)
123 #define RTC_BKP_DR21 ((uint32_t)0x00000015U)
124 #define RTC_BKP_DR22 ((uint32_t)0x00000016U)
125 #define RTC_BKP_DR23 ((uint32_t)0x00000017U)
126 #define RTC_BKP_DR24 ((uint32_t)0x00000018U)
127 #define RTC_BKP_DR25 ((uint32_t)0x00000019U)
128 #define RTC_BKP_DR26 ((uint32_t)0x0000001AU)
129 #define RTC_BKP_DR27 ((uint32_t)0x0000001BU)
130 #define RTC_BKP_DR28 ((uint32_t)0x0000001CU)
131 #define RTC_BKP_DR29 ((uint32_t)0x0000001DU)
132 #define RTC_BKP_DR30 ((uint32_t)0x0000001EU)
133 #define RTC_BKP_DR31 ((uint32_t)0x0000001FU)
134 
141 #define RTC_TIMESTAMPEDGE_RISING ((uint32_t)0x00000000U)
142 #define RTC_TIMESTAMPEDGE_FALLING ((uint32_t)0x00000008U)
143 
150 #define RTC_TAMPER_1 RTC_TAMPCR_TAMP1E
151 #define RTC_TAMPER_2 RTC_TAMPCR_TAMP2E
152 #define RTC_TAMPER_3 RTC_TAMPCR_TAMP3E
153 
160 #define RTC_TAMPER1_INTERRUPT RTC_TAMPCR_TAMP1IE
161 #define RTC_TAMPER2_INTERRUPT RTC_TAMPCR_TAMP2IE
162 #define RTC_TAMPER3_INTERRUPT RTC_TAMPCR_TAMP3IE
163 #define RTC_ALL_TAMPER_INTERRUPT RTC_TAMPCR_TAMPIE
164 
171 #define RTC_TIMESTAMPPIN_DEFAULT ((uint32_t)0x00000000U)
172 #define RTC_TIMESTAMPPIN_POS1 ((uint32_t)0x00000002U)
173 #define RTC_TIMESTAMPPIN_POS2 ((uint32_t)0x00000004U)
174 
181 #define RTC_TAMPERTRIGGER_RISINGEDGE ((uint32_t)0x00000000U)
182 #define RTC_TAMPERTRIGGER_FALLINGEDGE ((uint32_t)0x00000002U)
183 #define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE
184 #define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE
185 
192 #define RTC_TAMPER_ERASE_BACKUP_ENABLE ((uint32_t)0x00000000U)
193 #define RTC_TAMPER_ERASE_BACKUP_DISABLE ((uint32_t)0x00020000U)
194 
201 #define RTC_TAMPERMASK_FLAG_DISABLE ((uint32_t)0x00000000U)
202 #define RTC_TAMPERMASK_FLAG_ENABLE ((uint32_t)0x00040000U)
203 
210 #define RTC_TAMPERFILTER_DISABLE ((uint32_t)0x00000000U)
212 #define RTC_TAMPERFILTER_2SAMPLE ((uint32_t)0x00000800U)
214 #define RTC_TAMPERFILTER_4SAMPLE ((uint32_t)0x00001000U)
216 #define RTC_TAMPERFILTER_8SAMPLE ((uint32_t)0x00001800U)
225 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 ((uint32_t)0x00000000U)
227 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384 ((uint32_t)0x00000100U)
229 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192 ((uint32_t)0x00000200U)
231 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096 ((uint32_t)0x00000300U)
233 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048 ((uint32_t)0x00000400U)
235 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024 ((uint32_t)0x00000500U)
237 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512 ((uint32_t)0x00000600U)
239 #define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256 ((uint32_t)0x00000700U)
248 #define RTC_TAMPERPRECHARGEDURATION_1RTCCLK ((uint32_t)0x00000000U)
250 #define RTC_TAMPERPRECHARGEDURATION_2RTCCLK ((uint32_t)0x00002000U)
252 #define RTC_TAMPERPRECHARGEDURATION_4RTCCLK ((uint32_t)0x00004000U)
254 #define RTC_TAMPERPRECHARGEDURATION_8RTCCLK ((uint32_t)0x00006000U)
263 #define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE ((uint32_t)RTC_TAMPCR_TAMPTS)
264 #define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE ((uint32_t)0x00000000U)
272 #define RTC_TAMPER_PULLUP_ENABLE ((uint32_t)0x00000000U)
273 #define RTC_TAMPER_PULLUP_DISABLE ((uint32_t)RTC_TAMPCR_TAMPPUDIS)
281 #define RTC_WAKEUPCLOCK_RTCCLK_DIV16 ((uint32_t)0x00000000U)
282 #define RTC_WAKEUPCLOCK_RTCCLK_DIV8 ((uint32_t)0x00000001U)
283 #define RTC_WAKEUPCLOCK_RTCCLK_DIV4 ((uint32_t)0x00000002U)
284 #define RTC_WAKEUPCLOCK_RTCCLK_DIV2 ((uint32_t)0x00000003U)
285 #define RTC_WAKEUPCLOCK_CK_SPRE_16BITS ((uint32_t)0x00000004U)
286 #define RTC_WAKEUPCLOCK_CK_SPRE_17BITS ((uint32_t)0x00000006U)
287 
294 #define RTC_SMOOTHCALIB_PERIOD_32SEC ((uint32_t)0x00000000U)
296 #define RTC_SMOOTHCALIB_PERIOD_16SEC ((uint32_t)0x00002000U)
298 #define RTC_SMOOTHCALIB_PERIOD_8SEC ((uint32_t)0x00004000U)
307 #define RTC_SMOOTHCALIB_PLUSPULSES_SET ((uint32_t)0x00008000U)
310 #define RTC_SMOOTHCALIB_PLUSPULSES_RESET ((uint32_t)0x00000000U)
319 #define RTC_SHIFTADD1S_RESET ((uint32_t)0x00000000U)
320 #define RTC_SHIFTADD1S_SET ((uint32_t)0x80000000U)
321 
328 #define RTC_CALIBOUTPUT_512HZ ((uint32_t)0x00000000U)
329 #define RTC_CALIBOUTPUT_1HZ ((uint32_t)0x00080000U)
330 
338 /* Exported macros -----------------------------------------------------------*/
348 #define __HAL_RTC_WAKEUPTIMER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_WUTE))
349 
355 #define __HAL_RTC_WAKEUPTIMER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_WUTE))
356 
365 #define __HAL_RTC_WAKEUPTIMER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
366 
375 #define __HAL_RTC_WAKEUPTIMER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
376 
385 #define __HAL_RTC_WAKEUPTIMER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)
386 
395 #define __HAL_RTC_WAKEUPTIMER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
396 
406 #define __HAL_RTC_WAKEUPTIMER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
407 
416 #define __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
417 
423 #define __HAL_RTC_TAMPER1_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP1E))
424 
430 #define __HAL_RTC_TAMPER1_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP1E))
431 
437 #define __HAL_RTC_TAMPER2_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP2E))
438 
444 #define __HAL_RTC_TAMPER2_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP2E))
445 
451 #define __HAL_RTC_TAMPER3_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP3E))
452 
458 #define __HAL_RTC_TAMPER3_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP3E))
459 
471 #define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __INTERRUPT__) (((__INTERRUPT__) == RTC_IT_TAMP1) ? (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 3)) != RESET) ? SET : RESET) : \
472  ((__INTERRUPT__) == RTC_IT_TAMP2) ? (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 5)) != RESET) ? SET : RESET) : \
473  (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 7)) != RESET) ? SET : RESET))
474 
486 #define __HAL_RTC_TAMPER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->TAMPCR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
487 
498 #define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
499 
510 #define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
511 
517 #define __HAL_RTC_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_TSE))
518 
524 #define __HAL_RTC_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_TSE))
525 
534 #define __HAL_RTC_TIMESTAMP_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
535 
544 #define __HAL_RTC_TIMESTAMP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
545 
554 #define __HAL_RTC_TIMESTAMP_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)
555 
564 #define __HAL_RTC_TIMESTAMP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)
565 
575 #define __HAL_RTC_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
576 
586 #define __HAL_RTC_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
587 
593 #define __HAL_RTC_INTERNAL_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ITSE))
594 
600 #define __HAL_RTC_INTERNAL_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ITSE))
601 
610 #define __HAL_RTC_INTERNAL_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
611 
620 #define __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0003FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
621 
627 #define __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_COE))
628 
634 #define __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_COE))
635 
641 #define __HAL_RTC_CLOCKREF_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_REFCKON))
642 
648 #define __HAL_RTC_CLOCKREF_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_REFCKON))
649 
658 #define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)
659 
664 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
665 
670 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
671 
676 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
677 
682 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
683 
688 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
689 
694 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
695 
700 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
701 
706 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))
707 
712 #define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE();
713 
719 #define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE();
720 
725 #define __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
726 
731 #define __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
732 
737 #define __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)
738 
743 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT() (EXTI->IMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
744 
749 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT() (EXTI->IMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
750 
755 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
756 
761 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
762 
767 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
768 
773 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
774 
779 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
780 
785 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))
786 
791 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE();
792 
798 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE();
799 
804 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG() (EXTI->PR & RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
805 
810 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG() (EXTI->PR = RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
811 
816 #define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT() (EXTI->SWIER |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
817 
822 /* Exported functions --------------------------------------------------------*/
831 /* RTC TimeStamp and Tamper functions *****************************************/
832 HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);
833 HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);
837 HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format);
838 
843 
859 /* RTC Wake-up functions ******************************************************/
860 HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);
861 HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);
874 /* Extension Control functions ************************************************/
875 void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data);
876 uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister);
877 
878 HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmouthCalibMinusPulsesValue);
879 HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS);
893 /* Extension RTC features functions *******************************************/
903 /* Private types -------------------------------------------------------------*/
904 /* Private variables ---------------------------------------------------------*/
905 /* Private constants ---------------------------------------------------------*/
909 #define RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT ((uint32_t)EXTI_IMR_IM21)
910 #define RTC_EXTI_LINE_WAKEUPTIMER_EVENT ((uint32_t)EXTI_IMR_IM22)
915 /* Private constants ---------------------------------------------------------*/
916 
919 /* Masks Definition */
920 #define RTC_TAMPCR_TAMPXE ((uint32_t) (RTC_TAMPCR_TAMP3E | RTC_TAMPCR_TAMP2E | RTC_TAMPCR_TAMP1E))
921 #define RTC_TAMPCR_TAMPXIE ((uint32_t) (RTC_TAMPER1_INTERRUPT | RTC_TAMPER2_INTERRUPT | RTC_TAMPER3_INTERRUPT | RTC_ALL_TAMPER_INTERRUPT))
922 
926 /* Private macros ------------------------------------------------------------*/
934 #define IS_RTC_OUTPUT(__OUTPUT__) (((__OUTPUT__) == RTC_OUTPUT_DISABLE) || \
935  ((__OUTPUT__) == RTC_OUTPUT_ALARMA) || \
936  ((__OUTPUT__) == RTC_OUTPUT_ALARMB) || \
937  ((__OUTPUT__) == RTC_OUTPUT_WAKEUP))
938 #define IS_RTC_BKP(__BKP__) ((__BKP__) < (uint32_t) RTC_BKP_NUMBER)
939 #define IS_TIMESTAMP_EDGE(__EDGE__) (((__EDGE__) == RTC_TIMESTAMPEDGE_RISING) || \
940  ((__EDGE__) == RTC_TIMESTAMPEDGE_FALLING))
941 #define IS_RTC_TAMPER(__TAMPER__) ((((__TAMPER__) & ((uint32_t)(0xFFFFFFFFU ^ RTC_TAMPCR_TAMPXE))) == 0x00U) && ((__TAMPER__) != (uint32_t)RESET))
942 
943 #define IS_RTC_TAMPER_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & (uint32_t)(0xFFFFFFFFU ^ RTC_TAMPCR_TAMPXIE)) == 0x00U) && ((__INTERRUPT__) != (uint32_t)RESET))
944 
945 #define IS_RTC_TIMESTAMP_PIN(__PIN__) (((__PIN__) == RTC_TIMESTAMPPIN_DEFAULT) || \
946  ((__PIN__) == RTC_TIMESTAMPPIN_POS1) || \
947  ((__PIN__) == RTC_TIMESTAMPPIN_POS2))
948 #define IS_RTC_TAMPER_TRIGGER(__TRIGGER__) (((__TRIGGER__) == RTC_TAMPERTRIGGER_RISINGEDGE) || \
949  ((__TRIGGER__) == RTC_TAMPERTRIGGER_FALLINGEDGE) || \
950  ((__TRIGGER__) == RTC_TAMPERTRIGGER_LOWLEVEL) || \
951  ((__TRIGGER__) == RTC_TAMPERTRIGGER_HIGHLEVEL))
952 #define IS_RTC_TAMPER_ERASE_MODE(__MODE__) (((__MODE__) == RTC_TAMPER_ERASE_BACKUP_ENABLE) || \
953  ((__MODE__) == RTC_TAMPER_ERASE_BACKUP_DISABLE))
954 #define IS_RTC_TAMPER_MASKFLAG_STATE(__STATE__) (((__STATE__) == RTC_TAMPERMASK_FLAG_ENABLE) || \
955  ((__STATE__) == RTC_TAMPERMASK_FLAG_DISABLE))
956 #define IS_RTC_TAMPER_FILTER(__FILTER__) (((__FILTER__) == RTC_TAMPERFILTER_DISABLE) || \
957  ((__FILTER__) == RTC_TAMPERFILTER_2SAMPLE) || \
958  ((__FILTER__) == RTC_TAMPERFILTER_4SAMPLE) || \
959  ((__FILTER__) == RTC_TAMPERFILTER_8SAMPLE))
960 #define IS_RTC_TAMPER_SAMPLING_FREQ(__FREQ__) (((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768)|| \
961  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384)|| \
962  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192) || \
963  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096) || \
964  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048) || \
965  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024) || \
966  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512) || \
967  ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256))
968 #define IS_RTC_TAMPER_PRECHARGE_DURATION(__DURATION__) (((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_1RTCCLK) || \
969  ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_2RTCCLK) || \
970  ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_4RTCCLK) || \
971  ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_8RTCCLK))
972 #define IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(__DETECTION__) (((__DETECTION__) == RTC_TIMESTAMPONTAMPERDETECTION_ENABLE) || \
973  ((__DETECTION__) == RTC_TIMESTAMPONTAMPERDETECTION_DISABLE))
974 #define IS_RTC_TAMPER_PULLUP_STATE(__STATE__) (((__STATE__) == RTC_TAMPER_PULLUP_ENABLE) || \
975  ((__STATE__) == RTC_TAMPER_PULLUP_DISABLE))
976 #define IS_RTC_WAKEUP_CLOCK(__CLOCK__) (((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV16) || \
977  ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV8) || \
978  ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV4) || \
979  ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV2) || \
980  ((__CLOCK__) == RTC_WAKEUPCLOCK_CK_SPRE_16BITS) || \
981  ((__CLOCK__) == RTC_WAKEUPCLOCK_CK_SPRE_17BITS))
982 
983 #define IS_RTC_WAKEUP_COUNTER(__COUNTER__) ((__COUNTER__) <= 0xFFFF)
984 #define IS_RTC_SMOOTH_CALIB_PERIOD(__PERIOD__) (((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_32SEC) || \
985  ((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_16SEC) || \
986  ((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_8SEC))
987 #define IS_RTC_SMOOTH_CALIB_PLUS(__PLUS__) (((__PLUS__) == RTC_SMOOTHCALIB_PLUSPULSES_SET) || \
988  ((__PLUS__) == RTC_SMOOTHCALIB_PLUSPULSES_RESET))
989 #define IS_RTC_SMOOTH_CALIB_MINUS(__VALUE__) ((__VALUE__) <= 0x000001FF)
990 #define IS_RTC_SHIFT_ADD1S(__SEL__) (((__SEL__) == RTC_SHIFTADD1S_RESET) || \
991  ((__SEL__) == RTC_SHIFTADD1S_SET))
992 #define IS_RTC_SHIFT_SUBFS(__FS__) ((__FS__) <= 0x00007FFF)
993 #define IS_RTC_CALIB_OUTPUT(__OUTPUT__) (((__OUTPUT__) == RTC_CALIBOUTPUT_512HZ) || \
994  ((__OUTPUT__) == RTC_CALIBOUTPUT_1HZ))
995 
1011 #ifdef __cplusplus
1012 }
1013 #endif
1014 
1015 #endif /* __STM32F7xx_HAL_RTC_EX_H */
1016 
1017 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_RTCEx_EnableBypassShadow
HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc)
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_RTCEx_SetTimeStamp
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
HAL_RTCEx_SetInternalTimeStamp
HAL_StatusTypeDef HAL_RTCEx_SetInternalTimeStamp(RTC_HandleTypeDef *hrtc)
RTC_HandleTypeDef
RTC Handle Structure definition.
Definition: stm32f4xx_hal_rtc.h:165
HAL_RTCEx_SetRefClock
HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_DeactivateCalibrationOutPut
HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_SetSmoothCalib
HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmouthCalibMinusPulsesValue)
HAL_RTCEx_DeactivateWakeUpTimer
uint32_t HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_SetSynchroShift
HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS)
HAL_RTCEx_Tamper2EventCallback
void HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_BKUPRead
uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister)
HAL_RTCEx_Tamper1EventCallback
void HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc)
RTC_TamperTypeDef::MaskFlag
uint32_t MaskFlag
Definition: stm32f7xx_hal_rtc_ex.h:61
HAL_RTCEx_DeactivateTamper
HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper)
HAL_RTCEx_SetTamper_IT
HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper)
HAL_RTCEx_DisableBypassShadow
HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc)
RTC_TimeTypeDef
RTC Time structure definition.
Definition: stm32f4xx_hal_rtc.h:83
HAL_RTCEx_TimeStampEventCallback
void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc)
RTC_TamperTypeDef::NoErase
uint32_t NoErase
Definition: stm32f7xx_hal_rtc_ex.h:58
RTC_TamperTypeDef
RTC Tamper structure definition
Definition: stm32f4xx_hal_rtc_ex.h:47
HAL_RTCEx_DeactivateRefClock
HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_PollForAlarmBEvent
HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_GetWakeUpTimer
uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_SetWakeUpTimer
HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock)
HAL_RTCEx_AlarmBEventCallback
void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_PollForTamper3Event
HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_SetCalibrationOutPut
HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput)
HAL_RTCEx_BKUPWrite
void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data)
RTC_TamperTypeDef::Interrupt
uint32_t Interrupt
Definition: stm32f7xx_hal_rtc_ex.h:52
HAL_RTCEx_SetWakeUpTimer_IT
HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock)
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_RTCEx_PollForTimeStampEvent
HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_DeactivateTimeStamp
HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_SetTamper
HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper)
RTC_DateTypeDef
RTC Date structure definition.
Definition: stm32f4xx_hal_rtc.h:119
HAL_RTCEx_GetTimeStamp
HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format)
HAL_RTCEx_TamperTimeStampIRQHandler
void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_DeactivateInternalTimeStamp
HAL_StatusTypeDef HAL_RTCEx_DeactivateInternalTimeStamp(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_WakeUpTimerEventCallback
void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_PollForWakeUpTimerEvent
HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_PollForTamper1Event
HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_PollForTamper2Event
HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout)
HAL_RTCEx_WakeUpTimerIRQHandler
void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_Tamper3EventCallback
void HAL_RTCEx_Tamper3EventCallback(RTC_HandleTypeDef *hrtc)
HAL_RTCEx_SetTimeStamp_IT
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53