cancel
Showing results for 
Search instead for 
Did you mean: 

can receive timeout disable systick interrupt

-----????_---- ---??as
Associate III
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
1 ACCEPTED SOLUTION

Accepted Solutions
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 Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3
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 Venmo
Up vote any posts that you find helpful, it shows what's working..
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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..