FlexCAN
Freescale Semiconductor
30-20
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
30.3.10 Functional Overview
The FlexCAN module is flexible in that each one of its 16 message buffers (MBs) can be assigned as a
transmit buffer or a receive buffer. Each MB, which is up to 8 bytes long, is also assigned an interrupt flag
bit that indicates successful completion of transmission or reception.
An arbitration algorithm decides the prioritization of MBs to be transmitted based on the message ID or
the MB ordering. A matching algorithm makes it possible to store received frames only into MBs that have
the same ID programmed on its ID field. A masking scheme makes it possible to match the ID programmed
on the MB with a range of IDs on received CAN frames. Data coherency mechanisms are implemented to
guarantee data integrity during MB manipulation by the CPU.
Before proceeding with the functional description, an important concept must be explained. A message
buffer is said to be active at a given time if it can participate in the matching and arbitration algorithms that
are happening at that time. An Rx MB with a 0000 code is inactive (refer to
). Similarly, a Tx
MB with a 1000 code is inactive (refer to
). An MB not programmed with 0000 or 1000 is
temporarily deactivated (does not participate in the current arbitration/matching run) when the CPU writes
to the C/S field of that MB.
30.3.11 Transmit Process
The CPU prepares or changes an MB for transmission by writing the following:
1. Control/status word to hold Tx MB inactive (CODE = 1000)
2. ID word
3. Data bytes
4. Control/status word (active CODE, LENGTH)
0
1010
1010
Transmit a data frame when a remote request frame with the
same ID is received. This message buffer participates
simultaneously in the matching and arbitration processes. The
matching process compares the ID of the incoming remote
request frame with the ID of the MB. If a match occurs, this
message buffer is allowed to participate in the current arbitration
process and the CODE field is automatically updated to 1110 to
allow the MB to participate in future arbitration runs. When the
frame is eventually transmitted successfully, the code
automatically returns to 1010 to restart the process again.
0
1110
1010
This is an intermediate code automatically written to the
message buffer as a result of match to a remote request frame.
The data frame is transmitted unconditionally once, and then
the code automatically returns to 1010. The CPU can also write
this code with the same effect.
Table 30-13. Message Buffer Code for Tx Buffers (continued)
MBn[RTR]
Initial Tx
Code
Code After
Successful
Transmission
Description
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60