HAL TimeBase TIM Functions ¶
HAL TimeBase TIM Functions ¶
- group TimeBase_TIM_Exported_Functions
-
This group gathers functions for the HAL timebase based on a timer instance.
Functions
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)
-
This function configures the TIMx as a time base source. The time source is configured to have a 1 ms time base with a dedicated tick interrupt priority.
Note
This function is called automatically at the beginning of the program after reset by HAL_Init() or when the clock is configured by HAL_RCC_ClockConfig().
- Parameters :
-
tick_priority – Tick interrupt priority.
- Return values :
-
HAL_OK – HAL TIM time base correctly configured.
HAL_ERROR – Error occurred during HAL TIM time base configuration.
-
void
HAL_SuspendTick
(
void
)
-
Suspend tick increment.
Note
Disable the tick increment by disabling the TIMx update interrupt.
-
void
HAL_ResumeTick
(
void
)
-
Resume tick increment.
Note
Enable the tick increment by enabling the TIMx update interrupt.
-
void
TimeBase_TIM_UpdateCallback
(
hal_tim_handle_t
*
htim
)
¶
-
Timer update interrupt callback.
Note
Depending on the configuration, it can be registered as a callback or used directly.
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)
- group TimeBase_TIM_Exported_Functions
-
This group gathers functions for the HAL timebase based on a timer instance.
Functions
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)
-
This function configures the TIMx as a time base source. The time source is configured to have a 1 ms time base with a dedicated tick interrupt priority.
Note
This function is called automatically at the beginning of the program after reset by HAL_Init() or when the clock is configured by HAL_RCC_ClockConfig().
- Parameters :
-
tick_priority – Tick interrupt priority.
- Return values :
-
HAL_OK – HAL TIM time base correctly configured.
HAL_ERROR – Error occurred during HAL TIM time base configuration.
-
void
HAL_SuspendTick
(
void
)
-
Suspend tick increment.
Note
Disable the tick increment by disabling the TIMx update interrupt.
-
void
HAL_ResumeTick
(
void
)
-
Resume tick increment.
Note
Enable the tick increment by enabling the TIMx update interrupt.
-
void
TimeBase_TIM_UpdateCallback
(
hal_tim_handle_t
*
htim
)
-
Timer update interrupt callback.
Note
Depending on the configuration, it can be registered as a callback or used directly.
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)
- group TimeBase_TIM_Exported_Functions
-
This group gathers functions for the HAL timebase based on a timer instance.
Functions
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)
-
This function configures the TIMx as a time base source. The time source is configured to have a 1 ms time base with a dedicated tick interrupt priority.
Note
This function is called automatically at the beginning of the program after reset by HAL_Init() or when the clock is configured by HAL_RCC_ClockConfig().
- Parameters :
-
tick_priority – Tick interrupt priority.
- Return values :
-
HAL_OK – HAL TIM time base correctly configured.
HAL_ERROR – Error occurred during HAL TIM time base configuration.
-
void
HAL_SuspendTick
(
void
)
-
Suspend tick increment.
Note
Disable the tick increment by disabling the TIMx update interrupt.
-
void
HAL_ResumeTick
(
void
)
-
Resume tick increment.
Note
Enable the tick increment by enabling the TIMx update interrupt.
-
void
TimeBase_TIM_UpdateCallback
(
hal_tim_handle_t
*
htim
)
-
Timer update interrupt callback.
Note
Depending on the configuration, it can be registered as a callback or used directly.
-
hal_status_t
HAL_InitTick
(
hal_tick_freq_t
tick_freq
,
uint32_t
tick_priority
)