Nxp semiconductors – NXP Semiconductors LPC24XX UM10237 User Manual
Page 492
![background image](/manuals/190592/492/background.png)
UM10237_4
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 04 — 26 August 2009
492 of 792
NXP Semiconductors
UM10237
Chapter 18: LPC24XX CAN controllers CAN1/2
Automatic transmit priority detection
To allow uninterrupted streams of transmit messages, the CAN Controller provides
Automatic Transmit Priority Detection for all Transmit Buffers. Depending on the selected
Transmit Priority Mode, internal prioritization is based on the CAN Identifier or a user
defined "local priority". If more than one message is enabled for transmission (TR=1) the
internal transmit message queue is organized such as that the transmit buffer with the
lowest CAN Identifier (TID) or the lowest "local priority" (TX Priority) wins the prioritization
and is sent first. The result of the internal scheduling process is taken into account short
before a new CAN message is sent on the bus. This is also true after the occurrence of a
transmission error and right before a re-transmission.
Tx DLC
The number of bytes in the Data Field of a message is coded with the Data Length Code
(DLC). At the start of a Remote Frame transmission the DLC is not considered due to the
RTR bit being '1 ' (remote). This forces the number of transmitted/received data bytes to
be 0. Nevertheless, the DLC must be specified correctly to avoid bus errors, if two CAN
Controllers start a Remote Frame transmission with the same identifier simultaneously.
For reasons of compatibility no DLC > 8 should be used. If a value greater than 8 is
selected, 8 bytes are transmitted in the data frame with the Data Length Code specified in
DLC. The range of the Data Byte Count is 0 to 8 bytes and is coded as follows:
(11)
Table 433. Transmit Frame Information Register (CAN1TFI[1/2/3] - address
0xE004 40[30/40/50], CAN2TFI[1/2/3] - 0xE004 80[30/40/50]) bit description
Bit
Symbol Function
Reset
Value
RM
Set
7:0
PRIO
If the TPM (Transmit Priority Mode) bit in the CANxMOD register is
set to 1, enabled Tx Buffers contend for the right to send their
messages based on this field. The buffer with the lowest TX Priority
value wins the prioritization and is sent first.
x
15:8
-
Reserved.
0
19:16 DLC
Data Length Code. This value is sent in the DLC field of the next
transmit message. In addition, if RTR = 0, this value controls the
number of Data bytes sent in the next transmit message, from the
CANxTDA and CANxTDB registers:
0000-0111 = 0-7 bytes
1xxx = 8 bytes
0
X
29:20 -
Reserved.
0
30
RTR
This value is sent in the RTR bit of the next transmit message. If
this bit is 0, the number of data bytes called out by the DLC field are
sent from the CANxTDA and CANxTDB registers. If this bit is 1, a
Remote Frame is sent, containing a request for that number of
bytes.
0
X
31
FF
If this bit is 0, the next transmit message will be sent with an 11 bit
Identifier (standard frame format), while if it’s 1, the message will be
sent with a 29 bit Identifier (extended frame format).
0
X
DataByteCount
DLC
=