HAL TimeBase RTC Alarm Functions

HAL TimeBase RTC Alarm Functions

group TimeBase_RTC_Alarm_Exported_Functions

Functions

hal_status_t HAL_InitTick ( hal_tick_freq_t tick_freq , uint32_t tick_priority )

Configure the timebase frequency and interrupt priority.

Note

Called at the beginning of the program by HAL_Init() or when the system core clock is modified (for instance, by the HAL RCC driver when needed).

Note

Declared as __WEAK to allow override in a user file.

Warning

HAL tick is updated from interrupts at regular time intervals. Take care if HAL_Delay() is called from a peripheral interrupt process: the tick interrupt line needs higher priority (numerically lower) than the peripheral interrupt; otherwise, the caller interrupt process is blocked.

Parameters :
  • tick_freq – Tick frequency of type hal_tick_freq_t (to keep the current value, use global variable uwTickFreq)

  • tick_priority – Tick interrupt priority (to keep the current value, use global variable uwTickPrio)

Return values :

HAL_OK – HAL timebase correctly configured

void HAL_SuspendTick ( void )

Suspend tick increment.

Note

Disable tick increment by disabling the RTC alarm A interrupt.

Return values :

None

void HAL_ResumeTick ( void )

Resume tick increment.

Note

Enable tick increment by enabling the RTC alarm A interrupt.

Return values :

None

void HAL_RTC_AlarmAEventCallback ( void )

Handle the RTC alarm A callback.

Parameters :

None

Return values :

None