I'm working on a project that uses the STM32 HAL drivers, and in particular the CAN driver in interrupt mode. I understand that the STM32F407xx microcontroller has three CAN transmit mailboxes, allowing users to "enqueue" three messages for transmission at a time. The HAL CAN driver however seems to return HAL_BUSY when HAL_CAN_Transmit_IT() is called rapidly, on the second call; taking a look at the source code, it looks like the function doesn't check whether any other mailboxes are empty before setting the handle status to BUSY_TX (even though another mailbox could be used for the following message), preventing a successive call from adding a message to another mailbox.
Am I missing something about the way this driver works? Has anybody run into this in the past? Any thoughts would be appreciated.
Thanks!