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
306 of 571
NXP Semiconductors
UM10316
Chapter 21: LPC29xx CAN 0/1
7.
CAN controller self-test
The CAN controller supports two options for self-tests:
•
Global self-test: setting the self-reception request bit in normal operating mode
•
Local self-test: setting the self-reception request bit in self-test mode
Both self-tests use the self-reception feature of the CAN controller. Along with the
self-reception request the transmitted message is also received and stored in the receive
buffer, so the acceptance filter must be configured accordingly. As soon as the CAN
message is transmitted a transmit and a receive interrupt are generated (if enabled).
7.1 Global self-test
A global self-test can (for example) verify the used configuration in a given CAN system.
As shown in
, at least one other CAN node which acknowledges each CAN
message has to be connected to the CAN bus.
Initiating a global self-test is similar to a normal CAN transmission. Transmission of a CAN
message is initiated by setting the self-reception request bit SRR in conjunction with the
selected message-buffer bits STB3, STB2 and STB1 in the CAN controller command
register CCCMD.
7.2 Local self-test
Local self-test can be used for single-node tests. In this case an acknowledge from other
nodes is not needed. As shown in
, a CAN transceiver with an appropriate
CAN bus termination has to be connected.
The CAN controller must be put into self-test mode by setting the STM bit in the CAN
controller mode register CCMODE. Setting the STM bit is only possible when the CAN
controller is in reset mode.
Fig 72. Global self-test (example high-speed CAN bus)
Transceiver
TX Buffer
RX Buffer
ack
TX Buffer
TX Buffer
CAN Bus