67#define RTC_CLOCK_SOURCE_HSE
71#ifdef RTC_CLOCK_SOURCE_HSE
72 #define RTC_ASYNCH_PREDIV 99U
73 #define RTC_SYNCH_PREDIV 9U
74 #define RCC_RTCCLKSOURCE_1MHZ ((uint32_t)((uint32_t)RCC_BDCR_RTCSEL | (uint32_t)((HSE_VALUE/1000000U) << 16U)))
76 #define RTC_ASYNCH_PREDIV 0U
77 #define RTC_SYNCH_PREDIV 31U
98 __IO uint32_t counter = 0U;
104#ifdef RTC_CLOCK_SOURCE_LSE
110#elif defined (RTC_CLOCK_SOURCE_LSI)
116#elif defined (RTC_CLOCK_SOURCE_HSE)
124#error Please select the RTC Clock source
173 if (counter++ == (SystemCoreClock / 48U))
200 if (counter++ == (SystemCoreClock / 48U))
221 if (TickPriority < (1UL << __NVIC_PRIO_BITS))
275 __IO uint32_t counter = 0U;
284 while((hrtc->
Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)
286 if(counter++ == (SystemCoreClock /48U))
295 hrtc->
Instance->ISR &= (uint32_t)~RTC_ISR_INIT;
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
Sets the priority of an interrupt.
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
Enables a device specific interrupt in the NVIC interrupt controller.
void HAL_IncTick(void)
This function is called to increment a global variable "uwTick" used as application time base.
void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc)
ALARM A Event Callback in non blocking mode.
void HAL_ResumeTick(void)
Resume Tick increment.
void RTC_Alarm_IRQHandler(void)
This function handles RTC ALARM interrupt request.
RTC_HandleTypeDef hRTC_Handle
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
This function configures the RTC_ALARMA as a time base source. The time source is configured to have ...
void HAL_SuspendTick(void)
Suspend Tick increment.
#define RTC_ASYNCH_PREDIV
#define RCC_RTCCLKSOURCE_1MHZ
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
Initializes the RCC extended peripherals clocks according to the specified parameters in the RCC_Peri...
#define RCC_PERIPHCLK_RTC
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef.
#define __HAL_RCC_RTC_ENABLE()
Macros to enable or disable the RTC clock.
#define RCC_OSCILLATORTYPE_HSE
#define RCC_OSCILLATORTYPE_LSI
#define RCC_OSCILLATORTYPE_LSE
#define RCC_RTCCLKSOURCE_LSE
#define RCC_RTCCLKSOURCE_LSI
HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc)
Initializes the RTC peripheral.
void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc)
Handles Alarm interrupt request.
#define __HAL_RTC_ALARM_EXTI_ENABLE_IT()
Enable interrupt on the RTC Alarm associated EXTI line.
#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__)
Disable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__)
Enable the RTC ALARMA peripheral.
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__)
Clear the RTC Alarm's pending flags.
#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE()
Enable rising edge trigger on the RTC Alarm associated EXTI line.
#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__)
Enable the write protection for RTC registers.
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__)
Get the selected RTC Alarm's flag status.
#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__)
Enable the RTC Alarm interrupt.
#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__)
Disable the RTC Alarm interrupt.
#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__)
Disable the write protection for RTC registers.
#define RTC_OUTPUT_POLARITY_HIGH
#define RTC_OUTPUT_TYPE_OPENDRAIN
#define RTC_OUTPUT_DISABLE
This file contains all the functions prototypes for the HAL module driver.
HAL_StatusTypeDef
HAL Status structures definition
RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition.
RCC extended clocks structure definition.
uint32_t PeriphClockSelection
uint32_t RTCClockSelection
RTC Handle Structure definition.