RTEMS 6.1-rc7
Loading...
Searching...
No Matches
Macros | Functions
HAL TimeBase RTC WakeUp Template

Macros

#define RTC_CLOCK_SOURCE_HSE
 
#define RTC_ASYNCH_PREDIV   99U
 
#define RTC_SYNCH_PREDIV   9U
 
#define RCC_RTCCLKSOURCE_1MHZ   ((uint32_t)((uint32_t)RCC_BDCR_RTCSEL | (uint32_t)((HSE_VALUE/1000000U) << 12U)))
 

Functions

void RTC_WKUP_IRQHandler (void)
 This function handles WAKE UP TIMER interrupt request.
 
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
 This function configures the RTC_WKUP as a time base source. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. Wakeup Time base = ((RTC_ASYNCH_PREDIV + 1) * (RTC_SYNCH_PREDIV + 1)) / RTC_CLOCK = 1ms Wakeup Time = WakeupTimebase * WakeUpCounter (0 + 1) = 1 ms.
 
void HAL_SuspendTick (void)
 Suspend Tick increment.
 
void HAL_ResumeTick (void)
 Resume Tick increment.
 
void HAL_RTCEx_WakeUpTimerEventCallback (RTC_HandleTypeDef *hrtc)
 Wake Up Timer Event Callback in non blocking mode.
 

Detailed Description

Function Documentation

◆ HAL_InitTick()

HAL_StatusTypeDef HAL_InitTick ( uint32_t  TickPriority)

This function configures the RTC_WKUP as a time base source. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. Wakeup Time base = ((RTC_ASYNCH_PREDIV + 1) * (RTC_SYNCH_PREDIV + 1)) / RTC_CLOCK = 1ms Wakeup Time = WakeupTimebase * WakeUpCounter (0 + 1) = 1 ms.

Note
This function is called automatically at the beginning of program after reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
Parameters
TickPriorityTick interrupt priority.
Return values
HALstatus

◆ HAL_ResumeTick()

void HAL_ResumeTick ( void  )

Resume Tick increment.

Note
Enable the tick increment by Enabling RTC_WKUP interrupt.
Return values
None

◆ HAL_RTCEx_WakeUpTimerEventCallback()

void HAL_RTCEx_WakeUpTimerEventCallback ( RTC_HandleTypeDef hrtc)

Wake Up Timer Event Callback in non blocking mode.

Note
This function is called when RTC_WKUP interrupt took place, inside RTC_WKUP_IRQHandler(). It makes a direct call to HAL_IncTick() to increment a global variable "uwTick" used as application time base.
Parameters
hrtcRTC handle
Return values
None

◆ HAL_SuspendTick()

void HAL_SuspendTick ( void  )

Suspend Tick increment.

Note
Disable the tick increment by disabling RTC_WKUP interrupt.
Return values
None

◆ RTC_WKUP_IRQHandler()

void RTC_WKUP_IRQHandler ( void  )

This function handles WAKE UP TIMER interrupt request.

Return values
None