pazi88 / STM32_CAN

CAN bus Library for Arduino STM32
GNU General Public License v3.0
67 stars 28 forks source link

Hangs on STM32F042 #34

Closed TT-ZX closed 2 weeks ago

TT-ZX commented 4 months ago

I am getting a hang after calling can.write(). If I comment out line 330 __HAL_CAN_ENABLE_IT(n_pCanHandle, CAN_IT_TX_MAILBOX_EMPTY); in STM32_CAN.cpp then I no longer get the hang. This was also reported in issue #14 .

moksalahti commented 2 months ago

I have the same issue. I'm using the latest version and even though in issue #14 this is claimed to have been fixed, it looks like it's not. Commenting out the line with __HAL_CAN_ENABLE_IT(n_pCanHandle, CAN_IT_TX_MAILBOX_EMPTY); does prevent the hang but I get a similar right away when I try to do a Can.read().

TT-ZX commented 2 months ago

Yeah, I'm having the same issue. I didn't notice this at first because my application was only sending CAN packets, not receiving.

TT-ZX commented 2 weeks ago

Fixed with #42 .