cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_CAN_AddTx Message returns HAL_CAN_ERROR_PARAM

Myurt.1
Associate

Hi everyone,

I am working with STM32F405 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.

1 REPLY 1
RAnan.3
Associate III

Hey, Is your issue sorted? I am facing the exact issue with my controller STM32l452RC. Can you please drop the solution if this has been sorted?

Or could anyone share a solution for this ASAP?

Thanks.