HAL_InitTick() function
This function configures the source of the time base. The time source is configured to have 1ms time base with a dedicated Tick interrupt priority.
Arguments
TickPriority
Tick interrupt priority.
Return value
HAL status
Notes
This function is called automatically at the beginning of program after reset by HAL_Init() or at any time when clock is reconfigured by HAL_RCC_ClockConfig(). In the default implementation, SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Care must be taken if HAL_Delay() is called from a peripheral ISR process, The SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. The function is declared as __weak to be overwritten in case of other implementation in user file.
![]()
HAL_InitTick(TICK_INT_PRIORITY);
HAL_InitTick() is called by 4 functions and calls 10 functions:
![]()
HAL_InitTick()
HAL_InitTick() reads 18 variables and writes 29 variables:
![]()
HAL_InitTick()