cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 CAN Bus Busy Error

eng23
Senior
Posted on November 23, 2016 at 17:15

I'm working with CAN bus and sometimes my code stop receiving CAN Messages, only send.

The function below

/* Receive */
if (HAL_CAN_Receive_IT(CanHandle2, CAN_FIFO0) != HAL_OK)
{
/* Reception Error */
}

returns the HAL_CAN_STATE_BUSY_TX , and always stay there. To transmit I don't use interrupt like example code CAN_Networking. I searched in the forum and found any solution, only others related posts. Is there any solution for this? #can
1 REPLY 1
Walid FTITI_O
Senior II
Posted on November 29, 2016 at 15:59

Hi xrada,

I think It's related to a lock/unlock mechanism issue in the Cube library like this

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F4%20CAN%20HAL%20library%20-%20TX%20and%20RX&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&curre...

. This process is under review and a rework will be implemented. Meanwhile,the best approach would be simply removing the call to the lock and unlock in these two drivers as no critical section lock is really required for these drivers.

-Hannibal-