MPC5553/MPC5554 Microcontroller Reference Manual, Rev. 5
22-24
Freescale Semiconductor
22.4
Functional Description
22.4.1
Overview
The FlexCAN2 module is a CAN protocol engine with a very flexible message buffer configuration
scheme. The module can have up to 64 message buffers, any of which can be assigned as either a TX buffer
or an RX buffer. Each message buffer has an assigned interrupt flag to indicate successful completion of
transmission or reception.
22.4.2
Transmit Process
The CPU prepares a message buffer for transmission by executing the following steps:
•
Write the CODE field of the control and status word to keep the TX MB inactive (code = 1000).
•
Write the ID word.
•
Write the DATA bytes.
•
Write the LENGTH, SRR, IDE, RTR and CODE fields of the control and status word to activate
the TX MB.
The first and last steps are mandatory.
22.4.2.1
Arbitration Process
This process selects which will be the next MB to be transmitted. All MBs programmed as transmit buffers
will be scanned to find the lowest ID
1
or the lowest MB number, depending on the LBUF bit in the
CAN
x
_CR. The selected MB will be transferred to an internal serial message buffer (SMB), which is not
user accessible, and then transmitted.
The arbitration process is triggered in the following events:
•
During the CRC field of the CAN frame
•
During the error delimiter field of the CAN frame
•
During Intermission, if the winner MB defined in a previous arbitration was deactivated, or if there
was no MB to transmit, but the CPU wrote to the C/S word of any MB after the previous arbitration
finished
•
When MBM is in idle or bus off state and the CPU writes to the C/S word of any MB
•
Upon leaving freeze mode
When the arbitration is over, and there is a winner MB for transmission, the frame is transferred to the SMB
for transmission. This is called ‘move out.’ After move out, the CAN transmit machine will start to
transmit the frame according to the CAN protocol rules. FlexCAN2 transmits up to eight data bytes, even
if the data length code (DLC) value is bigger.
At the end of a successful transmission, the value of the free running timer at the beginning of the identifier
field is written into the TIME STAMP field in the MB, the CODE field in the control and status word of
the MB is updated, a status flag is set in CAN
x
_IFRL or CAN
x
_IFRH, and an MB interrupt is generated
if allowed by the corresponding interrupt mask register bit.
1. If LBUF is negated, the arbitration considers not only the ID, but also the RTR and IDE bits placed inside the ID at the same
positions they are transmitted in the CAN frame.
Summary of Contents for MPC5553
Page 5: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 2 Freescale Semiconductor...
Page 21: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 xvi Freescale Semiconductor...
Page 47: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 1 26 Freescale Semiconductor...
Page 163: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 4 20 Freescale Semiconductor...
Page 179: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 5 16 Freescale Semiconductor...
Page 561: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 13 38 Freescale Semiconductor...
Page 615: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 14 54 Freescale Semiconductor...
Page 707: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 17 68 Freescale Semiconductor...
Page 755: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 18 48 Freescale Semiconductor...
Page 873: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 19 118 Freescale Semiconductor...
Page 984: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 Freescale Semiconductor 21 41...
Page 985: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 21 42 Freescale Semiconductor...
Page 1019: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 22 34 Freescale Semiconductor...
Page 1129: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 25 90 Freescale Semiconductor...