DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
305 of 571
NXP Semiconductors
UM10316
Chapter 21: LPC29xx CAN 0/1
5.2 Automatic transmit-priority protection
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 (TPM) in the mode register, 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 or SRR=1) the internal
transmit-message queue is organized so that the transmit buffer with the lowest CAN
identifier (ID) or the lowest local priority (TXPRIO) is sent first. The result of this internal
scheduling process is taken into account before a new CAN message is sent onto the
bus. This is also true for a retransmission caused by a transmission error or lost
arbitration.
In cases where the same transmit priority or the same ID is chosen for more than one
transmit buffer, the buffer with the lowest number is sent first.
6.
CAN receive buffer
The CAN Controller has double receive-buffer architecture which allows the CPU to read
a received message while the next message is being received and stored in the remaining
buffer.
The CAN controller generates a data-overrun condition when both receive buffers are full
of messages and have not been released before a new message arrives and passes
through the acceptance filter. The data-overrun situation is signaled via the DOS bit in the
global status register CCGS and by the data-overrun interrupt DOI (if enabled).
As soon as a received message is read from the receive buffer, the buffer should be
released by setting the release-receive buffer bit RRB in the CAN controller mode register
CCCMD.
6.1 Receive buffer layout
The receive message buffer layout is similar to the transmit message buffer described
above. The identifier, frame format, remote-transmission request bit and data-length code
have the same meanings as those already described.The only differences are the
identifier index IDI and the bypass-mode bit BP in the message info register CCRXBMI.
The identifier index IDI is a 10-bit field in the message info register. It contains the table
position (index number) of the ID look-up table for an accepted and received CAN
message (see
for more details). Software can use this index number to
simplify message transfers from the receive buffer into the standard CPU RAM. The
bypass-mode bit BP is a status bit which signals whether or not a current CAN message
was received in acceptance-filter bypass mode. The acceptance filter can be put into
bypass mode by setting the ACCBP bit in the acceptance-filter mode register CAMODE.
The received data-length code in the message info register represents the received data
length.
Remark:
The CAN protocol specification
allows transmission of eight data
bytes in conjunction with a data-length code larger than eight. In this case the DLC will not
match the number of data bytes. This should be borne in mind when software uses the
received DLC information from the message info register CCRXBMI.