After quite a bit of investigation, Freescale issued a new errata for this processor. It turns out that the hardware mailbox Rx masks can become corrupted when using extended arbitration IDs. We now avoid this problem by setting the global mask to 0x0 and performing all message ID masking in software.
The errata:
Title: FlexCAN Writing to an Active Receive MB May Corrupt MB Contents
Description:
Deactivating a FlexCAN receive message buffer (MB) may cause corruption of another active receive
MB, including the ID field, if the following sequence occurs.
1. A receive MB is locked via reading the control/status word, and has a pending frame in the
temporary receive serial message buffer (SMB).
2. A second frame is received that matches a second receive MB, and is queued in the second SMB.
3. The first MB is unlocked during the time between receiving the CRC field and the sixth bit of end
of frame (EOF) of the second frame.
4. The second MB is deactivated within nine bus clock cycles of the sixth bit of EOF, resulting in
corruption of the first MB.
During standard use of the FlexCAN hardware, the errata can appear during heavy communications with
several Rx MBs at a low baudrate and while using Rx extended MB’s IDs. This can be easily observed by
checking ID value overwrite. In all cases, CAN transmissions from the processor are not affected at any
moment.
Workaround:
1. Do not write to the control/status word after initializing a receive MB. If a write (deactivation) is
required to the control/status field of an active receive MB, either freeze the FlexCAN module or
insert a delay of at least 27 CAN bit times plus 10 bus clock cycles between unlocking one MB and
deactivating another MB. This avoids MB corruption; however, frames may still be lost.
2. The FlexCAN software driver ensures IDs are not changed during each reception. As soon as it
has changed, return to original value.