Chapter 22 FlexCAN
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
539
22.3.2
Message buffer structure
The Message Buffer structure used by the FlexCAN module is represented in
and Standard Frames (29-bit Identifier and 11-bit Identifier, respectively) used in the CAN specification
(Version 2.0 Part B) are represented.
0
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0x0
CODE
SRR
IDE
RT
R
LENGTH
TIME STAMP
0x4
PRIO
ID (Standard/Extended)
ID (Extended)
0x8
Data Byte 0
Data Byte 1
Data Byte 2
Data Byte 3
0xC
Data Byte 4
Data Byte 5
Data Byte 6
Data Byte 7
= Unimplemented or Reserved
Figure 22-2. Message buffer structure
Table 22-5. Message Buffer structure field description
Field
Description
CODE
Message Buffer Code
This 4-bit field can be accessed (read or write) by the CPU and by the Flexcan module itself, as part
of the message buffer matching and arbitration process. The encoding is shown in
and
Section 22.4, “Functional description
for additional information.
SRR
Substitute Remote Request
Fixed recessive bit, used only in extended format. It must be set to 1 by the user for transmission
(Tx Buffers) and will be stored with the value received on the CAN bus for Rx receiving buffers. It
can be received as either recessive or dominant. If FlexCAN receives this bit as dominant, then it is
interpreted as arbitration loss.
0 Dominant is not a valid value for transmission in Extended Format frames.
1 Recessive value is compulsory for transmission in Extended Format frames.
IDE
ID Extended Bit
This bit identifies whether the frame format is standard or extended.
0 Frame format is standard
1 Frame format is extended
RTR
Remote Transmission Request
This bit is used for requesting transmissions of a data frame. If FlexCAN transmits this bit as 1
(recessive) and receives it as 0 (dominant), it is interpreted as arbitration loss. If this bit is
transmitted as 0 (dominant), then if it is received as 1 (recessive), the FlexCAN module treats it as
bit error. If the value received matches the value transmitted, it is considered as a successful bit
transmission.
0 Indicates the current MB has a Data Frame to be transmitted
1 Indicates the current MB has a Remote Frame to be transmitted
LENGTH
Length of Data in Bytes
This 4-bit field is the length (in bytes) of the Rx or Tx data, which is located in offset 0x8 through 0xF
of the MB space (see
). In reception, this field is written by the FlexCAN module, copied
from the DLC (Data Length Code) field of the received frame. In transmission, this field is written by
the CPU and corresponds to the DLC field value of the frame to be transmitted. When RTR=1, the
Frame to be transmitted is a Remote Frame and does not include the data field, regardless of the
Length field.