Skip to main content
-----????_---- ---??as
Associate II
August 17, 2017
Solved

can receive timeout disable systick interrupt

  • August 17, 2017
  • 1 reply
  • 2096 views
Posted on August 17, 2017 at 16:23

I am using hal lib.When I cut can transmission between microcontrollers.It is stuck in this function:

0690X000006041qQAA.jpg

HAL_GetTick() currently get same value because systick interrupt not working so the value systick increase every tick doesnt increase.So I stucked in this loop.Why systick interrupt not works?

This loop is in that function =>

HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef* hcan, uint8_t FIFONumber, uint32_t Timeout)

That fuction is in that dir =>

stm32f3xx_hal_can.c

#can #stm32 #hal-broken #systick #interrupt #stupid-as-designed
This topic has been closed for replies.
Best answer by Tesla DeLorean
Posted on August 17, 2017 at 17:16

Should be call by BSP or MSP initialization code, check in there.

Check also if other Interrupts are working, and that SysTick Handler is present.

1 reply

Tesla DeLorean
Guru
August 17, 2017
Posted on August 17, 2017 at 16:36

Probably because you're blocking in a callback? ie In Interrupt context, so priorities and inversion involved.

Change preemption levels so SysTick can fire, better yet use a TIM->CNT as the counter, not a software ticker.

#hal%20broken

#stupid%20as%20designed

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
-----????_---- ---??as
Associate II
August 17, 2017
Posted on August 17, 2017 at 17:04

I call this function in while(in main) when I cut transmission again stuck...How can I know if systick interrupt enabled or not

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
August 17, 2017
Posted on August 17, 2017 at 17:16

Should be call by BSP or MSP initialization code, check in there.

Check also if other Interrupts are working, and that SysTick Handler is present.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..