704
Chapter 19
CAN Controller (CAN)
Preliminary User’s Manual U17566EE1V2UM00
(20)
CnMDLCm - CANn message data length register m
The CnMDLCm register is used to set the number of bytes of the data field of a
message buffer.
Note
The data and DLC value actually transmitted to CAN bus are as follows.
Caution
1.
Be sure to set bits 7 to 4 to 0000B.
2.
Receive data is stored in as many CnMDATAxm register as the number of
bytes (however, the upper limit is 8) corresponding to DLC. The
CnMDATAxm register in which no data is stored is undefined.
After reset: 0000xxxxB
R/W
Address: refer to
“CAN registers overview“ on page 668
7
6
5
4
3
2
1
0
CnMDLCm
0
0
0
0
MDLC3
MDLC2
MDLC1
MDLC0
MDLC3
MDLC2
MDLC1
MDLC0
Data length of transmit/receive message
0
0
0
0
0 bytes
0
0
0
1
1 byte
0
0
1
0
2 bytes
0
0
1
1
3 bytes
0
1
0
0
4 bytes
0
1
0
1
5 bytes
0
1
1
0
6 bytes
0
1
1
1
7 bytes
1
0
0
0
8 bytes
1
0
0
1
Setting prohibited
(If these bits are set during transmission, 8-byte data is transmitted
regardless of the set DLC value when a data frame is transmitted.
However, the DLC actually transmitted to the CAN bus is the DLC
value set to this register.)
Note
1
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
Type of transmit frame
Length of transmit data
DLC transmitted
Data frame
Number of bytes specified by DLC
(However, 8 bytes if DLC
≥
8)
MDLC3 to MDLC0 bits
Remote frame
0 bytes
electronic components distributor