Skip to main content
alexey_public
Associate II
January 21, 2019
Question

With new version of STMCube (5.0.0) call of HAL_SYSTICK_IRQHandler is lost.

  • January 21, 2019
  • 2 replies
  • 834 views

In stm32f3xx_hal_cortex.c defined systick interrupt:

void HAL_SYSTICK_IRQHandler(void)
{
 HAL_SYSTICK_Callback();
}

but in stm32f3xx_it.c the systick interrupt defined too:

void SysTick_Handler(void)
{
 /* USER CODE BEGIN SysTick_IRQn 0 */
 
 /* USER CODE END SysTick_IRQn 0 */
 HAL_IncTick();
 /* USER CODE BEGIN SysTick_IRQn 1 */
 
 /* USER CODE END SysTick_IRQn 1 */
}

Of course in interrupt table (startup_stm32f373xc.s) can be used only one :)

g_pfnVectors:
	.word	_estack
	.word	Reset_Handler
...
	.word	SysTick_Handler

And HAL_SYSTICK_IRQHandler is never called. And with it is not called user defined HAL_SYSTICK_Callback :(

This topic has been closed for replies.

2 replies

Pavel A.
January 21, 2019

This was already discussed , IIRC.

HAL_SYSTICK_Callback has been deprecated. 90% of users do not need it.

If you want to be called every systick interrupt, you can add the code directly in the SysTick_Handler.

--pa

alexey_public
Associate II
January 21, 2019

Thank you.

Yes, i need callback to every systick interrupt. And now I simple add HAL_SYSTICK_Callback to SysTick_Handler:

void SysTick_Handler(void)
{
 /* USER CODE BEGIN SysTick_IRQn 0 */
 
 /* USER CODE END SysTick_IRQn 0 */
 HAL_IncTick();
 /* USER CODE BEGIN SysTick_IRQn 1 */
 
 HAL_SYSTICK_Callback();
 
 /* USER CODE END SysTick_IRQn 1 */
}

But it's something strange :)