cancel
Showing results for 
Search instead for 
Did you mean: 

Getting stuck at HAL_CAN_ERROR_PARAM after some time.

RAnan.3
Associate III

Hi everyone,

I am working with STM32l452RC and trying to transmit 16bit data using CANBus line including several units (motor controller, Bms and other circuits). Our CANBus line works fine for a long time. Now I am trying to add one more device to our line. I can receive all datas from other devices connected to CANBus, but when transmitting, after a few minutes HAL_CAN_AddTx Message() function returns HAL_CAN_ERROR_PARAM and then never transmits the data. When I debug the code, I saw that inside HAL_CAN_AddTx Message() code checks whether there is an empty mailbox or not and all three mailboxes seems full and function returns HAL_CAN_ERROR_PARAM. I checked mailboxes using HAL_CAN_GetTxMailboxesFreeLevel function and saw that when error occures it returns 3 meaning all mailboxes are full. This only happens after a few minutes transmitting data without problem. I tried loopback mode and it works fine. I read similar problems and could not find a soluiton. I will be grateful if someone can help.

Thanks.

0 REPLIES 0