37 #ifndef __STM32F4xx_LL_RTC_H
38 #define __STM32F4xx_LL_RTC_H
45 #include "stm32f4xx.h"
64 #define RTC_INIT_MASK 0xFFFFFFFFU
65 #define RTC_RSF_MASK 0xFFFFFF5FU
68 #define RTC_WRITE_PROTECTION_DISABLE ((uint8_t)0xFFU)
69 #define RTC_WRITE_PROTECTION_ENABLE_1 ((uint8_t)0xCAU)
70 #define RTC_WRITE_PROTECTION_ENABLE_2 ((uint8_t)0x53U)
73 #define RTC_OFFSET_WEEKDAY 24U
74 #define RTC_OFFSET_DAY 16U
75 #define RTC_OFFSET_MONTH 8U
76 #define RTC_OFFSET_HOUR 16U
77 #define RTC_OFFSET_MINUTE 8U
84 #if defined(USE_FULL_LL_DRIVER)
94 #if defined(USE_FULL_LL_DRIVER)
110 uint32_t AsynchPrescaler;
116 uint32_t SynchPrescaler;
121 } LL_RTC_InitTypeDef;
148 } LL_RTC_TimeTypeDef;
174 } LL_RTC_DateTypeDef;
181 LL_RTC_TimeTypeDef AlarmTime;
190 uint32_t AlarmDateWeekDaySel;
208 } LL_RTC_AlarmTypeDef;
220 #if defined(USE_FULL_LL_DRIVER)
224 #define LL_RTC_FORMAT_BIN 0x000000000U
225 #define LL_RTC_FORMAT_BCD 0x000000001U
233 #define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE 0x00000000U
234 #define LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL
242 #define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE 0x00000000U
243 #define LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMBR_WDSEL
254 #define LL_RTC_ISR_RECALPF RTC_ISR_RECALPF
255 #define LL_RTC_ISR_TAMP3F RTC_ISR_TAMP3F
256 #define LL_RTC_ISR_TAMP2F RTC_ISR_TAMP2F
257 #define LL_RTC_ISR_TAMP1F RTC_ISR_TAMP1F
258 #define LL_RTC_ISR_TSOVF RTC_ISR_TSOVF
259 #define LL_RTC_ISR_TSF RTC_ISR_TSF
260 #define LL_RTC_ISR_WUTF RTC_ISR_WUTF
261 #define LL_RTC_ISR_ALRBF RTC_ISR_ALRBF
262 #define LL_RTC_ISR_ALRAF RTC_ISR_ALRAF
263 #define LL_RTC_ISR_INITF RTC_ISR_INITF
264 #define LL_RTC_ISR_RSF RTC_ISR_RSF
265 #define LL_RTC_ISR_INITS RTC_ISR_INITS
266 #define LL_RTC_ISR_SHPF RTC_ISR_SHPF
267 #define LL_RTC_ISR_WUTWF RTC_ISR_WUTWF
268 #define LL_RTC_ISR_ALRBWF RTC_ISR_ALRBWF
269 #define LL_RTC_ISR_ALRAWF RTC_ISR_ALRAWF
278 #define LL_RTC_CR_TSIE RTC_CR_TSIE
279 #define LL_RTC_CR_WUTIE RTC_CR_WUTIE
280 #define LL_RTC_CR_ALRBIE RTC_CR_ALRBIE
281 #define LL_RTC_CR_ALRAIE RTC_CR_ALRAIE
282 #define LL_RTC_TAFCR_TAMPIE RTC_TAFCR_TAMPIE
290 #define LL_RTC_WEEKDAY_MONDAY ((uint8_t)0x01U)
291 #define LL_RTC_WEEKDAY_TUESDAY ((uint8_t)0x02U)
292 #define LL_RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03U)
293 #define LL_RTC_WEEKDAY_THURSDAY ((uint8_t)0x04U)
294 #define LL_RTC_WEEKDAY_FRIDAY ((uint8_t)0x05U)
295 #define LL_RTC_WEEKDAY_SATURDAY ((uint8_t)0x06U)
296 #define LL_RTC_WEEKDAY_SUNDAY ((uint8_t)0x07U)
304 #define LL_RTC_MONTH_JANUARY ((uint8_t)0x01U)
305 #define LL_RTC_MONTH_FEBRUARY ((uint8_t)0x02U)
306 #define LL_RTC_MONTH_MARCH ((uint8_t)0x03U)
307 #define LL_RTC_MONTH_APRIL ((uint8_t)0x04U)
308 #define LL_RTC_MONTH_MAY ((uint8_t)0x05U)
309 #define LL_RTC_MONTH_JUNE ((uint8_t)0x06U)
310 #define LL_RTC_MONTH_JULY ((uint8_t)0x07U)
311 #define LL_RTC_MONTH_AUGUST ((uint8_t)0x08U)
312 #define LL_RTC_MONTH_SEPTEMBER ((uint8_t)0x09U)
313 #define LL_RTC_MONTH_OCTOBER ((uint8_t)0x10U)
314 #define LL_RTC_MONTH_NOVEMBER ((uint8_t)0x11U)
315 #define LL_RTC_MONTH_DECEMBER ((uint8_t)0x12U)
323 #define LL_RTC_HOURFORMAT_24HOUR 0x00000000U
324 #define LL_RTC_HOURFORMAT_AMPM RTC_CR_FMT
332 #define LL_RTC_ALARMOUT_DISABLE 0x00000000U
333 #define LL_RTC_ALARMOUT_ALMA RTC_CR_OSEL_0
334 #define LL_RTC_ALARMOUT_ALMB RTC_CR_OSEL_1
335 #define LL_RTC_ALARMOUT_WAKEUP RTC_CR_OSEL
343 #define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN 0x00000000U
344 #define LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL RTC_TAFCR_ALARMOUTTYPE
352 #define LL_RTC_PIN_PC13 RTC_TAFCR_PC13MODE
353 #define LL_RTC_PIN_PC14 RTC_TAFCR_PC14MODE
354 #define LL_RTC_PIN_PC15 RTC_TAFCR_PC15MODE
362 #define LL_RTC_OUTPUTPOLARITY_PIN_HIGH 0x00000000U
363 #define LL_RTC_OUTPUTPOLARITY_PIN_LOW RTC_CR_POL
371 #define LL_RTC_TIME_FORMAT_AM_OR_24 0x00000000U
372 #define LL_RTC_TIME_FORMAT_PM RTC_TR_PM
380 #define LL_RTC_SHIFT_SECOND_DELAY 0x00000000U
381 #define LL_RTC_SHIFT_SECOND_ADVANCE RTC_SHIFTR_ADD1S
389 #define LL_RTC_ALMA_MASK_NONE 0x00000000U
390 #define LL_RTC_ALMA_MASK_DATEWEEKDAY RTC_ALRMAR_MSK4
391 #define LL_RTC_ALMA_MASK_HOURS RTC_ALRMAR_MSK3
392 #define LL_RTC_ALMA_MASK_MINUTES RTC_ALRMAR_MSK2
393 #define LL_RTC_ALMA_MASK_SECONDS RTC_ALRMAR_MSK1
394 #define LL_RTC_ALMA_MASK_ALL (RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1)
402 #define LL_RTC_ALMA_TIME_FORMAT_AM 0x00000000U
403 #define LL_RTC_ALMA_TIME_FORMAT_PM RTC_ALRMAR_PM
411 #define LL_RTC_ALMB_MASK_NONE 0x00000000U
412 #define LL_RTC_ALMB_MASK_DATEWEEKDAY RTC_ALRMBR_MSK4
413 #define LL_RTC_ALMB_MASK_HOURS RTC_ALRMBR_MSK3
414 #define LL_RTC_ALMB_MASK_MINUTES RTC_ALRMBR_MSK2
415 #define LL_RTC_ALMB_MASK_SECONDS RTC_ALRMBR_MSK1
416 #define LL_RTC_ALMB_MASK_ALL (RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1)
424 #define LL_RTC_ALMB_TIME_FORMAT_AM 0x00000000U
425 #define LL_RTC_ALMB_TIME_FORMAT_PM RTC_ALRMBR_PM
433 #define LL_RTC_TIMESTAMP_EDGE_RISING 0x00000000U
434 #define LL_RTC_TIMESTAMP_EDGE_FALLING RTC_CR_TSEDGE
442 #define LL_RTC_TS_TIME_FORMAT_AM 0x00000000U
443 #define LL_RTC_TS_TIME_FORMAT_PM RTC_TSTR_PM
451 #define LL_RTC_TAMPER_1 RTC_TAFCR_TAMP1E
452 #if defined(RTC_TAMPER2_SUPPORT)
453 #define LL_RTC_TAMPER_2 RTC_TAFCR_TAMP2E
462 #define LL_RTC_TAMPER_MASK_TAMPER1 RTC_TAFCR_TAMP1MF
463 #if defined(RTC_TAMPER2_SUPPORT)
464 #define LL_RTC_TAMPER_MASK_TAMPER2 RTC_TAFCR_TAMP2MF
473 #define LL_RTC_TAMPER_NOERASE_TAMPER1 RTC_TAFCR_TAMP1NOERASE
474 #if defined(RTC_TAMPER2_SUPPORT)
475 #define LL_RTC_TAMPER_NOERASE_TAMPER2 RTC_TAFCR_TAMP2NOERASE
481 #if defined(RTC_TAFCR_TAMPPRCH)
485 #define LL_RTC_TAMPER_DURATION_1RTCCLK 0x00000000U
486 #define LL_RTC_TAMPER_DURATION_2RTCCLK RTC_TAFCR_TAMPPRCH_0
487 #define LL_RTC_TAMPER_DURATION_4RTCCLK RTC_TAFCR_TAMPPRCH_1
488 #define LL_RTC_TAMPER_DURATION_8RTCCLK RTC_TAFCR_TAMPPRCH
494 #if defined(RTC_TAFCR_TAMPFLT)
498 #define LL_RTC_TAMPER_FILTER_DISABLE 0x00000000U
499 #define LL_RTC_TAMPER_FILTER_2SAMPLE RTC_TAFCR_TAMPFLT_0
500 #define LL_RTC_TAMPER_FILTER_4SAMPLE RTC_TAFCR_TAMPFLT_1
501 #define LL_RTC_TAMPER_FILTER_8SAMPLE RTC_TAFCR_TAMPFLT
507 #if defined(RTC_TAFCR_TAMPFREQ)
511 #define LL_RTC_TAMPER_SAMPLFREQDIV_32768 0x00000000U
512 #define LL_RTC_TAMPER_SAMPLFREQDIV_16384 RTC_TAFCR_TAMPFREQ_0
513 #define LL_RTC_TAMPER_SAMPLFREQDIV_8192 RTC_TAFCR_TAMPFREQ_1
514 #define LL_RTC_TAMPER_SAMPLFREQDIV_4096 (RTC_TAFCR_TAMPFREQ_1 | RTC_TAFCR_TAMPFREQ_0)
515 #define LL_RTC_TAMPER_SAMPLFREQDIV_2048 RTC_TAFCR_TAMPFREQ_2
516 #define LL_RTC_TAMPER_SAMPLFREQDIV_1024 (RTC_TAFCR_TAMPFREQ_2 | RTC_TAFCR_TAMPFREQ_0)
517 #define LL_RTC_TAMPER_SAMPLFREQDIV_512 (RTC_TAFCR_TAMPFREQ_2 | RTC_TAFCR_TAMPFREQ_1)
518 #define LL_RTC_TAMPER_SAMPLFREQDIV_256 RTC_TAFCR_TAMPFREQ
527 #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 RTC_TAFCR_TAMP1TRG
528 #if defined(RTC_TAMPER2_SUPPORT)
529 #define LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 RTC_TAFCR_TAMP2TRG
538 #define LL_RTC_WAKEUPCLOCK_DIV_16 0x00000000U
539 #define LL_RTC_WAKEUPCLOCK_DIV_8 (RTC_CR_WUCKSEL_0)
540 #define LL_RTC_WAKEUPCLOCK_DIV_4 (RTC_CR_WUCKSEL_1)
541 #define LL_RTC_WAKEUPCLOCK_DIV_2 (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_0)
542 #define LL_RTC_WAKEUPCLOCK_CKSPRE (RTC_CR_WUCKSEL_2)
543 #define LL_RTC_WAKEUPCLOCK_CKSPRE_WUT (RTC_CR_WUCKSEL_2 | RTC_CR_WUCKSEL_1)
551 #define LL_RTC_BKP_DR0 0x00000000U
552 #define LL_RTC_BKP_DR1 0x00000001U
553 #define LL_RTC_BKP_DR2 0x00000002U
554 #define LL_RTC_BKP_DR3 0x00000003U
555 #define LL_RTC_BKP_DR4 0x00000004U
556 #if RTC_BKP_NUMBER > 5
557 #define LL_RTC_BKP_DR5 0x00000005U
558 #define LL_RTC_BKP_DR6 0x00000006U
559 #define LL_RTC_BKP_DR7 0x00000007U
560 #define LL_RTC_BKP_DR8 0x00000008U
561 #define LL_RTC_BKP_DR9 0x00000009U
562 #define LL_RTC_BKP_DR10 0x0000000AU
563 #define LL_RTC_BKP_DR11 0x0000000BU
564 #define LL_RTC_BKP_DR12 0x0000000CU
565 #define LL_RTC_BKP_DR13 0x0000000DU
566 #define LL_RTC_BKP_DR14 0x0000000EU
567 #define LL_RTC_BKP_DR15 0x0000000FU
570 #if RTC_BKP_NUMBER > 16
571 #define LL_RTC_BKP_DR16 0x00000010U
572 #define LL_RTC_BKP_DR17 0x00000011U
573 #define LL_RTC_BKP_DR18 0x00000012U
574 #define LL_RTC_BKP_DR19 0x00000013U
583 #define LL_RTC_CALIB_OUTPUT_NONE 0x00000000U
584 #define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL)
585 #define LL_RTC_CALIB_OUTPUT_512HZ (RTC_CR_COE)
593 #define LL_RTC_CALIB_SIGN_POSITIVE 0x00000000U
594 #define LL_RTC_CALIB_SIGN_NEGATIVE RTC_CALIBR_DCS
602 #define LL_RTC_CALIB_INSERTPULSE_NONE 0x00000000U
603 #define LL_RTC_CALIB_INSERTPULSE_SET RTC_CALR_CALP
611 #define LL_RTC_CALIB_PERIOD_32SEC 0x00000000U
612 #define LL_RTC_CALIB_PERIOD_16SEC RTC_CALR_CALW16
613 #define LL_RTC_CALIB_PERIOD_8SEC RTC_CALR_CALW8
621 #define LL_RTC_TimeStampPin_Default 0x00000000U
622 #if defined(RTC_AF2_SUPPORT)
623 #define LL_RTC_TimeStampPin_Pos1 RTC_TAFCR_TSINSEL
632 #define LL_RTC_TamperPin_Default 0x00000000U
633 #if defined(RTC_AF2_SUPPORT)
634 #define LL_RTC_TamperPin_Pos1 RTC_TAFCR_TAMP1INSEL
660 #define LL_RTC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
668 #define LL_RTC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
682 #define __LL_RTC_CONVERT_BIN2BCD(__VALUE__) (uint8_t)((((__VALUE__) / 10U) << 4U) | ((__VALUE__) % 10U))
689 #define __LL_RTC_CONVERT_BCD2BIN(__VALUE__) (uint8_t)(((uint8_t)((__VALUE__) & (uint8_t)0xF0U) >> (uint8_t)0x4U) * 10U + ((__VALUE__) & (uint8_t)0x0FU))
711 #define __LL_RTC_GET_WEEKDAY(__RTC_DATE__) (((__RTC_DATE__) >> RTC_OFFSET_WEEKDAY) & 0x000000FFU)
718 #define __LL_RTC_GET_YEAR(__RTC_DATE__) ((__RTC_DATE__) & 0x000000FFU)
737 #define __LL_RTC_GET_MONTH(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_MONTH) & 0x000000FFU)
744 #define __LL_RTC_GET_DAY(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_DAY) & 0x000000FFU)
759 #define __LL_RTC_GET_HOUR(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_HOUR) & 0x000000FFU)
766 #define __LL_RTC_GET_MINUTE(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_MINUTE) & 0x000000FFU)
773 #define __LL_RTC_GET_SECOND(__RTC_TIME__) ((__RTC_TIME__) & 0x000000FFU)
803 __STATIC_INLINE
void LL_RTC_SetHourFormat(RTC_TypeDef *RTCx, uint32_t HourFormat)
805 MODIFY_REG(RTCx->CR, RTC_CR_FMT, HourFormat);
816 __STATIC_INLINE uint32_t LL_RTC_GetHourFormat(RTC_TypeDef *RTCx)
818 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_FMT));
833 __STATIC_INLINE
void LL_RTC_SetAlarmOutEvent(RTC_TypeDef *RTCx, uint32_t AlarmOutput)
835 MODIFY_REG(RTCx->CR, RTC_CR_OSEL, AlarmOutput);
848 __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent(RTC_TypeDef *RTCx)
850 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_OSEL));
865 __STATIC_INLINE
void LL_RTC_SetAlarmOutputType(RTC_TypeDef *RTCx, uint32_t Output)
867 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_ALARMOUTTYPE, Output);
881 __STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType(RTC_TypeDef *RTCx)
883 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_ALARMOUTTYPE));
900 __STATIC_INLINE
void LL_RTC_EnablePushPullMode(RTC_TypeDef *RTCx, uint32_t PinMask)
902 SET_BIT(RTCx->TAFCR, PinMask);
919 __STATIC_INLINE
void LL_RTC_DisablePushPullMode(RTC_TypeDef* RTCx, uint32_t PinMask)
921 CLEAR_BIT(RTCx->TAFCR, PinMask);
935 __STATIC_INLINE
void LL_RTC_SetOutputPin(RTC_TypeDef* RTCx, uint32_t PinMask)
937 SET_BIT(RTCx->TAFCR, (PinMask >> 1));
951 __STATIC_INLINE
void LL_RTC_ResetOutputPin(RTC_TypeDef* RTCx, uint32_t PinMask)
953 CLEAR_BIT(RTCx->TAFCR, (PinMask >> 1));
965 __STATIC_INLINE
void LL_RTC_EnableInitMode(RTC_TypeDef *RTCx)
968 WRITE_REG(RTCx->ISR, RTC_INIT_MASK);
977 __STATIC_INLINE
void LL_RTC_DisableInitMode(RTC_TypeDef *RTCx)
980 WRITE_REG(RTCx->ISR, (uint32_t)~RTC_ISR_INIT);
993 __STATIC_INLINE
void LL_RTC_SetOutputPolarity(RTC_TypeDef *RTCx, uint32_t Polarity)
995 MODIFY_REG(RTCx->CR, RTC_CR_POL, Polarity);
1006 __STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity(RTC_TypeDef *RTCx)
1008 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_POL));
1018 __STATIC_INLINE
void LL_RTC_EnableShadowRegBypass(RTC_TypeDef *RTCx)
1020 SET_BIT(RTCx->CR, RTC_CR_BYPSHAD);
1029 __STATIC_INLINE
void LL_RTC_DisableShadowRegBypass(RTC_TypeDef *RTCx)
1031 CLEAR_BIT(RTCx->CR, RTC_CR_BYPSHAD);
1040 __STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled(RTC_TypeDef *RTCx)
1042 return (READ_BIT(RTCx->CR, RTC_CR_BYPSHAD) == (RTC_CR_BYPSHAD));
1053 __STATIC_INLINE
void LL_RTC_EnableRefClock(RTC_TypeDef *RTCx)
1055 SET_BIT(RTCx->CR, RTC_CR_REFCKON);
1066 __STATIC_INLINE
void LL_RTC_DisableRefClock(RTC_TypeDef *RTCx)
1068 CLEAR_BIT(RTCx->CR, RTC_CR_REFCKON);
1078 __STATIC_INLINE
void LL_RTC_SetAsynchPrescaler(RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
1080 MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_PRER_PREDIV_A_Pos);
1090 __STATIC_INLINE
void LL_RTC_SetSynchPrescaler(RTC_TypeDef *RTCx, uint32_t SynchPrescaler)
1092 MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_S, SynchPrescaler);
1101 __STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler(RTC_TypeDef *RTCx)
1103 return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_PRER_PREDIV_A_Pos);
1112 __STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler(RTC_TypeDef *RTCx)
1114 return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_S));
1123 __STATIC_INLINE
void LL_RTC_EnableWriteProtection(RTC_TypeDef *RTCx)
1125 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE);
1134 __STATIC_INLINE
void LL_RTC_DisableWriteProtection(RTC_TypeDef *RTCx)
1136 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1);
1137 WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2);
1159 __STATIC_INLINE
void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
1161 MODIFY_REG(RTCx->TR, RTC_TR_PM, TimeFormat);
1176 __STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat(RTC_TypeDef *RTCx)
1178 return (uint32_t)(READ_BIT(RTCx->TR, RTC_TR_PM));
1192 __STATIC_INLINE
void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
1194 MODIFY_REG(RTCx->TR, (RTC_TR_HT | RTC_TR_HU),
1195 (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)));
1211 __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx)
1213 register uint32_t temp = 0U;
1215 temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU));
1216 return (uint32_t)((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos));
1230 __STATIC_INLINE
void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
1232 MODIFY_REG(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU),
1233 (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)));
1249 __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx)
1251 register uint32_t temp = 0U;
1253 temp = READ_BIT(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU));
1254 return (uint32_t)((((temp & RTC_TR_MNT) >> RTC_TR_MNT_Pos) << 4U) | ((temp & RTC_TR_MNU) >> RTC_TR_MNU_Pos));
1268 __STATIC_INLINE
void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
1270 MODIFY_REG(RTCx->TR, (RTC_TR_ST | RTC_TR_SU),
1271 (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos)));
1287 __STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx)
1289 register uint32_t temp = 0U;
1291 temp = READ_BIT(RTCx->TR, (RTC_TR_ST | RTC_TR_SU));
1292 return (uint32_t)((((temp & RTC_TR_ST) >> RTC_TR_ST_Pos) << 4U) | ((temp & RTC_TR_SU) >> RTC_TR_SU_Pos));
1316 __STATIC_INLINE
void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
1318 register uint32_t temp = 0U;
1320 temp = Format12_24 | \
1321 (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)) | \
1322 (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)) | \
1323 (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos));
1324 MODIFY_REG(RTCx->TR, (RTC_TR_PM | RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU), temp);
1344 __STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx)
1346 register uint32_t temp = 0U;
1348 temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU));
1349 return (uint32_t)((((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos)) << RTC_OFFSET_HOUR) | \
1350 (((((temp & RTC_TR_MNT) >> RTC_TR_MNT_Pos) << 4U) | ((temp & RTC_TR_MNU) >> RTC_TR_MNU_Pos)) << RTC_OFFSET_MINUTE) | \
1351 ((((temp & RTC_TR_ST) >> RTC_TR_ST_Pos) << 4U) | ((temp & RTC_TR_SU) >> RTC_TR_SU_Pos)));
1361 __STATIC_INLINE
void LL_RTC_TIME_EnableDayLightStore(RTC_TypeDef *RTCx)
1363 SET_BIT(RTCx->CR, RTC_CR_BKP);
1373 __STATIC_INLINE
void LL_RTC_TIME_DisableDayLightStore(RTC_TypeDef *RTCx)
1375 CLEAR_BIT(RTCx->CR, RTC_CR_BKP);
1384 __STATIC_INLINE uint32_t LL_RTC_TIME_IsDayLightStoreEnabled(RTC_TypeDef *RTCx)
1386 return (READ_BIT(RTCx->CR, RTC_CR_BKP) == (RTC_CR_BKP));
1396 __STATIC_INLINE
void LL_RTC_TIME_DecHour(RTC_TypeDef *RTCx)
1398 SET_BIT(RTCx->CR, RTC_CR_SUB1H);
1408 __STATIC_INLINE
void LL_RTC_TIME_IncHour(RTC_TypeDef *RTCx)
1410 SET_BIT(RTCx->CR, RTC_CR_ADD1H);
1426 __STATIC_INLINE uint32_t LL_RTC_TIME_GetSubSecond(RTC_TypeDef *RTCx)
1428 return (uint32_t)(READ_BIT(RTCx->SSR, RTC_SSR_SS));
1445 __STATIC_INLINE
void LL_RTC_TIME_Synchronize(RTC_TypeDef *RTCx, uint32_t ShiftSecond, uint32_t Fraction)
1447 WRITE_REG(RTCx->SHIFTR, ShiftSecond | Fraction);
1467 __STATIC_INLINE
void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
1469 MODIFY_REG(RTCx->DR, (RTC_DR_YT | RTC_DR_YU),
1470 (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)));
1483 __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx)
1485 register uint32_t temp = 0U;
1487 temp = READ_BIT(RTCx->DR, (RTC_DR_YT | RTC_DR_YU));
1488 return (uint32_t)((((temp & RTC_DR_YT) >> RTC_DR_YT_Pos) << 4U) | ((temp & RTC_DR_YU) >> RTC_DR_YU_Pos));
1505 __STATIC_INLINE
void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
1507 MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_DR_WDU_Pos);
1525 __STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx)
1527 return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_DR_WDU_Pos);
1551 __STATIC_INLINE
void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
1553 MODIFY_REG(RTCx->DR, (RTC_DR_MT | RTC_DR_MU),
1554 (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)));
1579 __STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx)
1581 register uint32_t temp = 0U;
1583 temp = READ_BIT(RTCx->DR, (RTC_DR_MT | RTC_DR_MU));
1584 return (uint32_t)((((temp & RTC_DR_MT) >> RTC_DR_MT_Pos) << 4U) | ((temp & RTC_DR_MU) >> RTC_DR_MU_Pos));
1596 __STATIC_INLINE
void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
1598 MODIFY_REG(RTCx->DR, (RTC_DR_DT | RTC_DR_DU),
1599 (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos)));
1612 __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx)
1614 register uint32_t temp = 0U;
1616 temp = READ_BIT(RTCx->DR, (RTC_DR_DT | RTC_DR_DU));
1617 return (uint32_t)((((temp & RTC_DR_DT) >> RTC_DR_DT_Pos) << 4U) | ((temp & RTC_DR_DU) >> RTC_DR_DU_Pos));
1655 __STATIC_INLINE
void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year)
1657 register uint32_t temp = 0U;
1659 temp = (WeekDay << RTC_DR_WDU_Pos) | \
1660 (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)) | \
1661 (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)) | \
1662 (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos));
1664 MODIFY_REG(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU), temp);
1683 __STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx)
1685 register uint32_t temp = 0U;
1687 temp = READ_BIT(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU));
1688 return (uint32_t)((((temp & RTC_DR_WDU) >> RTC_DR_WDU_Pos) << RTC_OFFSET_WEEKDAY) | \
1689 (((((temp & RTC_DR_DT) >> RTC_DR_DT_Pos) << 4U) | ((temp & RTC_DR_DU) >> RTC_DR_DU_Pos)) << RTC_OFFSET_DAY) | \
1690 (((((temp & RTC_DR_MT) >> RTC_DR_MT_Pos) << 4U) | ((temp & RTC_DR_MU) >> RTC_DR_MU_Pos)) << RTC_OFFSET_MONTH) | \
1691 ((((temp & RTC_DR_YT) >> RTC_DR_YT_Pos) << 4U) | ((temp & RTC_DR_YU) >> RTC_DR_YU_Pos)));
1709 __STATIC_INLINE
void LL_RTC_ALMA_Enable(RTC_TypeDef *RTCx)
1711 SET_BIT(RTCx->CR, RTC_CR_ALRAE);
1721 __STATIC_INLINE
void LL_RTC_ALMA_Disable(RTC_TypeDef *RTCx)
1723 CLEAR_BIT(RTCx->CR, RTC_CR_ALRAE);
1742 __STATIC_INLINE
void LL_RTC_ALMA_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
1744 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1, Mask);
1762 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask(RTC_TypeDef *RTCx)
1764 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1));
1773 __STATIC_INLINE
void LL_RTC_ALMA_EnableWeekday(RTC_TypeDef *RTCx)
1775 SET_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
1784 __STATIC_INLINE
void LL_RTC_ALMA_DisableWeekday(RTC_TypeDef *RTCx)
1786 CLEAR_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL);
1798 __STATIC_INLINE
void LL_RTC_ALMA_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
1800 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU),
1801 (((Day & 0xF0U) << (RTC_ALRMAR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMAR_DU_Pos)));
1812 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx)
1814 register uint32_t temp = 0U;
1816 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU));
1817 return (uint32_t)((((temp & RTC_ALRMAR_DT) >> RTC_ALRMAR_DT_Pos) << 4U) | ((temp & RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos));
1834 __STATIC_INLINE
void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
1836 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_ALRMAR_DU_Pos);
1852 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay(RTC_TypeDef *RTCx)
1854 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos);
1866 __STATIC_INLINE
void LL_RTC_ALMA_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
1868 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM, TimeFormat);
1879 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat(RTC_TypeDef *RTCx)
1881 return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_PM));
1893 __STATIC_INLINE
void LL_RTC_ALMA_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
1895 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU),
1896 (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)));
1907 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
1909 register uint32_t temp = 0U;
1911 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU));
1912 return (uint32_t)((((temp & RTC_ALRMAR_HT) >> RTC_ALRMAR_HT_Pos) << 4U) | ((temp & RTC_ALRMAR_HU) >> RTC_ALRMAR_HU_Pos));
1924 __STATIC_INLINE
void LL_RTC_ALMA_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
1926 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU),
1927 (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)));
1938 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
1940 register uint32_t temp = 0U;
1942 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU));
1943 return (uint32_t)((((temp & RTC_ALRMAR_MNT) >> RTC_ALRMAR_MNT_Pos) << 4U) | ((temp & RTC_ALRMAR_MNU) >> RTC_ALRMAR_MNU_Pos));
1955 __STATIC_INLINE
void LL_RTC_ALMA_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
1957 MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU),
1958 (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos)));
1969 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx)
1971 register uint32_t temp = 0U;
1973 temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU));
1974 return (uint32_t)((((temp & RTC_ALRMAR_ST) >> RTC_ALRMAR_ST_Pos) << 4U) | ((temp & RTC_ALRMAR_SU) >> RTC_ALRMAR_SU_Pos));
1995 __STATIC_INLINE
void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
1997 register uint32_t temp = 0U;
1999 temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \
2000 (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \
2001 (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos));
2003 MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST | RTC_ALRMAR_SU, temp);
2019 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime(RTC_TypeDef *RTCx)
2021 return (uint32_t)((LL_RTC_ALMA_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMA_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMA_GetSecond(RTCx));
2033 __STATIC_INLINE
void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
2035 MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_ALRMASSR_MASKSS_Pos);
2044 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask(RTC_TypeDef *RTCx)
2046 return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_ALRMASSR_MASKSS_Pos);
2056 __STATIC_INLINE
void LL_RTC_ALMA_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
2058 MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_SS, Subsecond);
2067 __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond(RTC_TypeDef *RTCx)
2069 return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_SS));
2087 __STATIC_INLINE
void LL_RTC_ALMB_Enable(RTC_TypeDef *RTCx)
2089 SET_BIT(RTCx->CR, RTC_CR_ALRBE);
2099 __STATIC_INLINE
void LL_RTC_ALMB_Disable(RTC_TypeDef *RTCx)
2101 CLEAR_BIT(RTCx->CR, RTC_CR_ALRBE);
2120 __STATIC_INLINE
void LL_RTC_ALMB_SetMask(RTC_TypeDef *RTCx, uint32_t Mask)
2122 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1, Mask);
2140 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMask(RTC_TypeDef *RTCx)
2142 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1));
2151 __STATIC_INLINE
void LL_RTC_ALMB_EnableWeekday(RTC_TypeDef *RTCx)
2153 SET_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
2162 __STATIC_INLINE
void LL_RTC_ALMB_DisableWeekday(RTC_TypeDef *RTCx)
2164 CLEAR_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL);
2176 __STATIC_INLINE
void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
2178 MODIFY_REG(RTC->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU),
2179 (((Day & 0xF0U) << (RTC_ALRMBR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMBR_DU_Pos)));
2190 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx)
2192 register uint32_t temp = 0U;
2194 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU));
2195 return (uint32_t)((((temp & RTC_ALRMBR_DT) >> RTC_ALRMBR_DT_Pos) << 4U) | ((temp & RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos));
2212 __STATIC_INLINE
void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
2214 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_ALRMBR_DU_Pos);
2230 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetWeekDay(RTC_TypeDef *RTCx)
2232 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos);
2244 __STATIC_INLINE
void LL_RTC_ALMB_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat)
2246 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM, TimeFormat);
2257 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTimeFormat(RTC_TypeDef *RTCx)
2259 return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_PM));
2271 __STATIC_INLINE
void LL_RTC_ALMB_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
2273 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU),
2274 (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)));
2285 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx)
2287 register uint32_t temp = 0U;
2289 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU));
2290 return (uint32_t)((((temp & RTC_ALRMBR_HT) >> RTC_ALRMBR_HT_Pos) << 4U) | ((temp & RTC_ALRMBR_HU) >> RTC_ALRMBR_HU_Pos));
2302 __STATIC_INLINE
void LL_RTC_ALMB_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
2304 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU),
2305 (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)));
2316 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx)
2318 register uint32_t temp = 0U;
2320 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU));
2321 return (uint32_t)((((temp & RTC_ALRMBR_MNT) >> RTC_ALRMBR_MNT_Pos) << 4U) | ((temp & RTC_ALRMBR_MNU) >> RTC_ALRMBR_MNU_Pos));
2333 __STATIC_INLINE
void LL_RTC_ALMB_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
2335 MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU),
2336 (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos)));
2347 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx)
2349 register uint32_t temp = 0U;
2351 temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU));
2352 return (uint32_t)((((temp & RTC_ALRMBR_ST) >> RTC_ALRMBR_ST_Pos) << 4U) | ((temp & RTC_ALRMBR_SU) >> RTC_ALRMBR_SU_Pos));
2373 __STATIC_INLINE
void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds)
2375 register uint32_t temp = 0U;
2377 temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)) | \
2378 (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)) | \
2379 (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos));
2381 MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM| RTC_ALRMBR_HT | RTC_ALRMBR_HU | RTC_ALRMBR_MNT | RTC_ALRMBR_MNU | RTC_ALRMBR_ST | RTC_ALRMBR_SU, temp);
2397 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTime(RTC_TypeDef *RTCx)
2399 return (uint32_t)((LL_RTC_ALMB_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMB_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMB_GetSecond(RTCx));
2411 __STATIC_INLINE
void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
2413 MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_ALRMBSSR_MASKSS_Pos);
2422 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecondMask(RTC_TypeDef *RTCx)
2424 return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_ALRMBSSR_MASKSS_Pos);
2434 __STATIC_INLINE
void LL_RTC_ALMB_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond)
2436 MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS, Subsecond);
2445 __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecond(RTC_TypeDef *RTCx)
2447 return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS));
2465 __STATIC_INLINE
void LL_RTC_TS_Enable(RTC_TypeDef *RTCx)
2467 SET_BIT(RTCx->CR, RTC_CR_TSE);
2477 __STATIC_INLINE
void LL_RTC_TS_Disable(RTC_TypeDef *RTCx)
2479 CLEAR_BIT(RTCx->CR, RTC_CR_TSE);
2493 __STATIC_INLINE
void LL_RTC_TS_SetActiveEdge(RTC_TypeDef *RTCx, uint32_t Edge)
2495 MODIFY_REG(RTCx->CR, RTC_CR_TSEDGE, Edge);
2507 __STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge(RTC_TypeDef *RTCx)
2509 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TSEDGE));
2520 __STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat(RTC_TypeDef *RTCx)
2522 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_PM));
2533 __STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx)
2535 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_TSTR_HU_Pos);
2546 __STATIC_INLINE uint32_t LL_RTC_TS_GetMinute(RTC_TypeDef *RTCx)
2548 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_TSTR_MNU_Pos);
2559 __STATIC_INLINE uint32_t LL_RTC_TS_GetSecond(RTC_TypeDef *RTCx)
2561 return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_ST | RTC_TSTR_SU));
2577 __STATIC_INLINE uint32_t LL_RTC_TS_GetTime(RTC_TypeDef *RTCx)
2579 return (uint32_t)(READ_BIT(RTCx->TSTR,
2580 RTC_TSTR_HT | RTC_TSTR_HU | RTC_TSTR_MNT | RTC_TSTR_MNU | RTC_TSTR_ST | RTC_TSTR_SU));
2596 __STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx)
2598 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_TSDR_WDU_Pos);
2621 __STATIC_INLINE uint32_t LL_RTC_TS_GetMonth(RTC_TypeDef *RTCx)
2623 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_TSDR_MU_Pos);
2634 __STATIC_INLINE uint32_t LL_RTC_TS_GetDay(RTC_TypeDef *RTCx)
2636 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_DT | RTC_TSDR_DU));
2651 __STATIC_INLINE uint32_t LL_RTC_TS_GetDate(RTC_TypeDef *RTCx)
2653 return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU | RTC_TSDR_MT | RTC_TSDR_MU | RTC_TSDR_DT | RTC_TSDR_DU));
2662 __STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond(RTC_TypeDef *RTCx)
2664 return (uint32_t)(READ_BIT(RTCx->TSSSR, RTC_TSSSR_SS));
2667 #if defined(RTC_TAFCR_TAMPTS)
2674 __STATIC_INLINE
void LL_RTC_TS_EnableOnTamper(RTC_TypeDef *RTCx)
2676 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPTS);
2685 __STATIC_INLINE
void LL_RTC_TS_DisableOnTamper(RTC_TypeDef *RTCx)
2687 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPTS);
2703 __STATIC_INLINE
void LL_RTC_TS_SetPin(RTC_TypeDef *RTCx, uint32_t TSPin)
2705 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TSINSEL , TSPin);
2720 __STATIC_INLINE uint32_t LL_RTC_TS_GetPin(RTC_TypeDef *RTCx)
2722 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TSINSEL));
2745 __STATIC_INLINE
void LL_RTC_TAMPER_Enable(RTC_TypeDef *RTCx, uint32_t Tamper)
2747 SET_BIT(RTCx->TAFCR, Tamper);
2762 __STATIC_INLINE
void LL_RTC_TAMPER_Disable(RTC_TypeDef *RTCx, uint32_t Tamper)
2764 CLEAR_BIT(RTCx->TAFCR, Tamper);
2767 #if defined(RTC_TAFCR_TAMPPUDIS)
2774 __STATIC_INLINE
void LL_RTC_TAMPER_DisablePullUp(RTC_TypeDef *RTCx)
2776 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPUDIS);
2785 __STATIC_INLINE
void LL_RTC_TAMPER_EnablePullUp(RTC_TypeDef *RTCx)
2787 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPUDIS);
2791 #if defined(RTC_TAFCR_TAMPPRCH)
2803 __STATIC_INLINE
void LL_RTC_TAMPER_SetPrecharge(RTC_TypeDef *RTCx, uint32_t Duration)
2805 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPPRCH, Duration);
2818 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPrecharge(RTC_TypeDef *RTCx)
2820 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPPRCH));
2824 #if defined(RTC_TAFCR_TAMPFLT)
2836 __STATIC_INLINE
void LL_RTC_TAMPER_SetFilterCount(RTC_TypeDef *RTCx, uint32_t FilterCount)
2838 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPFLT, FilterCount);
2851 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetFilterCount(RTC_TypeDef *RTCx)
2853 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPFLT));
2857 #if defined(RTC_TAFCR_TAMPFREQ)
2873 __STATIC_INLINE
void LL_RTC_TAMPER_SetSamplingFreq(RTC_TypeDef *RTCx, uint32_t SamplingFreq)
2875 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMPFREQ, SamplingFreq);
2892 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetSamplingFreq(RTC_TypeDef *RTCx)
2894 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPFREQ));
2910 __STATIC_INLINE
void LL_RTC_TAMPER_EnableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
2912 SET_BIT(RTCx->TAFCR, Tamper);
2927 __STATIC_INLINE
void LL_RTC_TAMPER_DisableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper)
2929 CLEAR_BIT(RTCx->TAFCR, Tamper);
2944 __STATIC_INLINE
void LL_RTC_TAMPER_SetPin(RTC_TypeDef *RTCx, uint32_t TamperPin)
2946 MODIFY_REG(RTCx->TAFCR, RTC_TAFCR_TAMP1INSEL , TamperPin);
2961 __STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPin(RTC_TypeDef *RTCx)
2963 return (uint32_t)(READ_BIT(RTCx->TAFCR, RTC_TAFCR_TAMP1INSEL));
2981 __STATIC_INLINE
void LL_RTC_WAKEUP_Enable(RTC_TypeDef *RTCx)
2983 SET_BIT(RTCx->CR, RTC_CR_WUTE);
2993 __STATIC_INLINE
void LL_RTC_WAKEUP_Disable(RTC_TypeDef *RTCx)
2995 CLEAR_BIT(RTCx->CR, RTC_CR_WUTE);
3004 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled(RTC_TypeDef *RTCx)
3006 return (READ_BIT(RTCx->CR, RTC_CR_WUTE) == (RTC_CR_WUTE));
3024 __STATIC_INLINE
void LL_RTC_WAKEUP_SetClock(RTC_TypeDef *RTCx, uint32_t WakeupClock)
3026 MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock);
3041 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock(RTC_TypeDef *RTCx)
3043 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_WUCKSEL));
3054 __STATIC_INLINE
void LL_RTC_WAKEUP_SetAutoReload(RTC_TypeDef *RTCx, uint32_t Value)
3056 MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUT, Value);
3065 __STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload(RTC_TypeDef *RTCx)
3067 return (uint32_t)(READ_BIT(RTCx->WUTR, RTC_WUTR_WUT));
3106 __STATIC_INLINE
void LL_RTC_BAK_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister, uint32_t Data)
3108 register uint32_t tmp = 0U;
3110 tmp = (uint32_t)(&(RTCx->BKP0R));
3111 tmp += (BackupRegister * 4U);
3114 *(__IO uint32_t *)tmp = (uint32_t)Data;
3144 __STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister)
3146 register uint32_t tmp = 0U;
3148 tmp = (uint32_t)(&(RTCx->BKP0R));
3149 tmp += (BackupRegister * 4U);
3152 return (*(__IO uint32_t *)tmp);
3175 __STATIC_INLINE
void LL_RTC_CAL_SetOutputFreq(RTC_TypeDef *RTCx, uint32_t Frequency)
3177 MODIFY_REG(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL, Frequency);
3190 __STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq(RTC_TypeDef *RTCx)
3192 return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL));
3203 __STATIC_INLINE
void LL_RTC_CAL_EnableCoarseDigital(RTC_TypeDef *RTCx)
3205 SET_BIT(RTCx->CR, RTC_CR_DCE);
3216 __STATIC_INLINE
void LL_RTC_CAL_DisableCoarseDigital(RTC_TypeDef *RTCx)
3218 CLEAR_BIT(RTCx->CR, RTC_CR_DCE);
3236 __STATIC_INLINE
void LL_RTC_CAL_ConfigCoarseDigital(RTC_TypeDef* RTCx, uint32_t Sign, uint32_t Value)
3238 MODIFY_REG(RTCx->CALIBR, RTC_CALIBR_DCS | RTC_CALIBR_DC, Sign | Value);
3247 __STATIC_INLINE uint32_t LL_RTC_CAL_GetCoarseDigitalValue(RTC_TypeDef *RTCx)
3249 return (uint32_t)(READ_BIT(RTCx->CALIBR, RTC_CALIBR_DC));
3260 __STATIC_INLINE uint32_t LL_RTC_CAL_GetCoarseDigitalSign(RTC_TypeDef* RTCx)
3262 return (uint32_t)(READ_BIT(RTCx->CALIBR, RTC_CALIBR_DCS));
3276 __STATIC_INLINE
void LL_RTC_CAL_SetPulse(RTC_TypeDef *RTCx, uint32_t Pulse)
3278 MODIFY_REG(RTCx->CALR, RTC_CALR_CALP, Pulse);
3287 __STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted(RTC_TypeDef *RTCx)
3289 return (READ_BIT(RTCx->CALR, RTC_CALR_CALP) == (RTC_CALR_CALP));
3305 __STATIC_INLINE
void LL_RTC_CAL_SetPeriod(RTC_TypeDef *RTCx, uint32_t Period)
3307 MODIFY_REG(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16, Period);
3320 __STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod(RTC_TypeDef *RTCx)
3322 return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16));
3334 __STATIC_INLINE
void LL_RTC_CAL_SetMinus(RTC_TypeDef *RTCx, uint32_t CalibMinus)
3336 MODIFY_REG(RTCx->CALR, RTC_CALR_CALM, CalibMinus);
3345 __STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus(RTC_TypeDef *RTCx)
3347 return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALM));
3364 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RECALP(RTC_TypeDef *RTCx)
3366 return (READ_BIT(RTCx->ISR, RTC_ISR_RECALPF) == (RTC_ISR_RECALPF));
3370 #if defined(RTC_TAMPER2_SUPPORT)
3377 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2(RTC_TypeDef *RTCx)
3379 return (READ_BIT(RTCx->ISR, RTC_ISR_TAMP2F) == (RTC_ISR_TAMP2F));
3389 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1(RTC_TypeDef *RTCx)
3391 return (READ_BIT(RTCx->ISR, RTC_ISR_TAMP1F) == (RTC_ISR_TAMP1F));
3400 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOV(RTC_TypeDef *RTCx)
3402 return (READ_BIT(RTCx->ISR, RTC_ISR_TSOVF) == (RTC_ISR_TSOVF));
3411 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TS(RTC_TypeDef *RTCx)
3413 return (READ_BIT(RTCx->ISR, RTC_ISR_TSF) == (RTC_ISR_TSF));
3422 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUT(RTC_TypeDef *RTCx)
3424 return (READ_BIT(RTCx->ISR, RTC_ISR_WUTF) == (RTC_ISR_WUTF));
3433 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRB(RTC_TypeDef *RTCx)
3435 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRBF) == (RTC_ISR_ALRBF));
3444 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRA(RTC_TypeDef *RTCx)
3446 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRAF) == (RTC_ISR_ALRAF));
3450 #if defined(RTC_TAMPER2_SUPPORT)
3457 __STATIC_INLINE
void LL_RTC_ClearFlag_TAMP2(RTC_TypeDef *RTCx)
3459 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP2F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3469 __STATIC_INLINE
void LL_RTC_ClearFlag_TAMP1(RTC_TypeDef *RTCx)
3471 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP1F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3480 __STATIC_INLINE
void LL_RTC_ClearFlag_TSOV(RTC_TypeDef *RTCx)
3482 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSOVF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3491 __STATIC_INLINE
void LL_RTC_ClearFlag_TS(RTC_TypeDef *RTCx)
3493 WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3502 __STATIC_INLINE
void LL_RTC_ClearFlag_WUT(RTC_TypeDef *RTCx)
3504 WRITE_REG(RTCx->ISR, (~((RTC_ISR_WUTF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3513 __STATIC_INLINE
void LL_RTC_ClearFlag_ALRB(RTC_TypeDef *RTCx)
3515 WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRBF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3524 __STATIC_INLINE
void LL_RTC_ClearFlag_ALRA(RTC_TypeDef *RTCx)
3526 WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRAF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3535 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INIT(RTC_TypeDef *RTCx)
3537 return (READ_BIT(RTCx->ISR, RTC_ISR_INITF) == (RTC_ISR_INITF));
3546 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RS(RTC_TypeDef *RTCx)
3548 return (READ_BIT(RTCx->ISR, RTC_ISR_RSF) == (RTC_ISR_RSF));
3557 __STATIC_INLINE
void LL_RTC_ClearFlag_RS(RTC_TypeDef *RTCx)
3559 WRITE_REG(RTCx->ISR, (~((RTC_ISR_RSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT)));
3568 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INITS(RTC_TypeDef *RTCx)
3570 return (READ_BIT(RTCx->ISR, RTC_ISR_INITS) == (RTC_ISR_INITS));
3579 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_SHP(RTC_TypeDef *RTCx)
3581 return (READ_BIT(RTCx->ISR, RTC_ISR_SHPF) == (RTC_ISR_SHPF));
3590 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTW(RTC_TypeDef *RTCx)
3592 return (READ_BIT(RTCx->ISR, RTC_ISR_WUTWF) == (RTC_ISR_WUTWF));
3601 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRBW(RTC_TypeDef *RTCx)
3603 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRBWF) == (RTC_ISR_ALRBWF));
3612 __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRAW(RTC_TypeDef *RTCx)
3614 return (READ_BIT(RTCx->ISR, RTC_ISR_ALRAWF) == (RTC_ISR_ALRAWF));
3632 __STATIC_INLINE
void LL_RTC_EnableIT_TS(RTC_TypeDef *RTCx)
3634 SET_BIT(RTCx->CR, RTC_CR_TSIE);
3644 __STATIC_INLINE
void LL_RTC_DisableIT_TS(RTC_TypeDef *RTCx)
3646 CLEAR_BIT(RTCx->CR, RTC_CR_TSIE);
3656 __STATIC_INLINE
void LL_RTC_EnableIT_WUT(RTC_TypeDef *RTCx)
3658 SET_BIT(RTCx->CR, RTC_CR_WUTIE);
3668 __STATIC_INLINE
void LL_RTC_DisableIT_WUT(RTC_TypeDef *RTCx)
3670 CLEAR_BIT(RTCx->CR, RTC_CR_WUTIE);
3680 __STATIC_INLINE
void LL_RTC_EnableIT_ALRB(RTC_TypeDef *RTCx)
3682 SET_BIT(RTCx->CR, RTC_CR_ALRBIE);
3692 __STATIC_INLINE
void LL_RTC_DisableIT_ALRB(RTC_TypeDef *RTCx)
3694 CLEAR_BIT(RTCx->CR, RTC_CR_ALRBIE);
3704 __STATIC_INLINE
void LL_RTC_EnableIT_ALRA(RTC_TypeDef *RTCx)
3706 SET_BIT(RTCx->CR, RTC_CR_ALRAIE);
3716 __STATIC_INLINE
void LL_RTC_DisableIT_ALRA(RTC_TypeDef *RTCx)
3718 CLEAR_BIT(RTCx->CR, RTC_CR_ALRAIE);
3727 __STATIC_INLINE
void LL_RTC_EnableIT_TAMP(RTC_TypeDef *RTCx)
3729 SET_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPIE);
3738 __STATIC_INLINE
void LL_RTC_DisableIT_TAMP(RTC_TypeDef *RTCx)
3740 CLEAR_BIT(RTCx->TAFCR, RTC_TAFCR_TAMPIE);
3749 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TS(RTC_TypeDef *RTCx)
3751 return (READ_BIT(RTCx->CR, RTC_CR_TSIE) == (RTC_CR_TSIE));
3760 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_WUT(RTC_TypeDef *RTCx)
3762 return (READ_BIT(RTCx->CR, RTC_CR_WUTIE) == (RTC_CR_WUTIE));
3771 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRB(RTC_TypeDef *RTCx)
3773 return (READ_BIT(RTCx->CR, RTC_CR_ALRBIE) == (RTC_CR_ALRBIE));
3782 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRA(RTC_TypeDef *RTCx)
3784 return (READ_BIT(RTCx->CR, RTC_CR_ALRAIE) == (RTC_CR_ALRAIE));
3793 __STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP(RTC_TypeDef *RTCx)
3795 return (READ_BIT(RTCx->TAFCR,
3796 RTC_TAFCR_TAMPIE) == (RTC_TAFCR_TAMPIE));
3803 #if defined(USE_FULL_LL_DRIVER)
3808 ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx);
3809 ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct);
3810 void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct);
3811 ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct);
3812 void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct);
3813 ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct);
3814 void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct);
3815 ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
3816 ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
3817 void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
3818 void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct);
3819 ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx);
3820 ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx);
3821 ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx);