Through pain and suffering I've found that the MCAN driver in FSL v2.1.4 does not support Tx FiFo operation, despite the API suggesting it does.
Deep down in the comments of the MCAN_TransferHandleIRQ implementation on lines 1632 through 1652 I've found the following:
else
{
/* Handle the interrupt flag unsupported in current version of MCAN driver.
* User can get these unsupported interrupt flags by callback function,
* we can clear directly in the handler to prevent endless loop.
*/
result = valueIR;
result &= ~((uint32_t)kMCAN_ErrorWarningIntFlag | (uint32_t)kMCAN_ErrorPassiveIntFlag |
(uint32_t)kMCAN_BusOffIntFlag | (uint32_t)kMCAN_TxTransmitCompleteFlag |
(uint32_t)kMCAN_RxFifo0NewFlag | (uint32_t)kMCAN_RxFifo0LostFlag |
(uint32_t)kMCAN_RxFifo1NewFlag | (uint32_t)kMCAN_RxFifo1LostFlag);
}
/* Clear Error interrupt, resolved Rx FIFO, Tx Buffer IRQ and other unsupported interrupt flags. */
MCAN_ClearStatusFlag(base, result);
/* Calling Callback Function if has one. */
if (handle->callback != NULL)
{
handle->callback(base, handle, status, result, handle->userData);
}
As suggested in the comment, you could implement the missing interrupt handling in a callback instead.