Nxp semiconductors – NXP Semiconductors LPC24XX UM10237 User Manual

Page 472

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

472 of 792

NXP Semiconductors

UM10237

Chapter 18: LPC24XX CAN controllers CAN1/2

Both self-tests are using the ‘Self Reception’ feature of the CAN Controller. With the Self
Reception Request, the transmitted message is also received and stored in the receive
buffer. Therefore the acceptance filter has to be configured accordingly. As soon as the
CAN message is transmitted, a transmit and a receive interrupt are generated, if enabled.

Global self test

A Global Self-Test can for example be used to verify the chosen configuration of the CAN
Controller in a given CAN system. As shown in

Figure 18–76

, at least one other CAN

node, which is acknowledging each CAN message has to be connected to the CAN bus.

Initiating a Global Self-Test is similar to a normal CAN transmission. In this case the
transmission of a CAN message(s) is initiated by setting Self Reception Request bit
(SRR) in conjunction with the selected Message Buffer bits (STB3, STB2, STB1) in the
CAN Controller Command register (CANCMR).

Local self test

The Local Self-Test perfectly fits for single node tests. In this case an acknowledge from
other nodes is not needed. As shown in the Figure below, a CAN transceiver with an
appropriate CAN bus termination has to be connected to the LPC. The CAN Controller
has to be put into the 'Self Test Mode' by setting the STM bit in the CAN Controller Mode
register (CANMOD). Hint: Setting the Self Test Mode bit (STM) is possible only when the
CAN Controller is in Reset Mode.

A message transmission is initiated by setting Self Reception Request bit (SRR) in
conjunction with the selected Message Buffer(s) (STB3, STB2, STB1).

Fig 76. Global Self-Test (high-speed CAN Bus example)

Transceiver

TX Buffer

RX Buffer

ack

TX Buffer

TX Buffer

CAN Bus

LPC24xx

Fig 77. Local self test (high-speed CAN Bus example)

Transceiver

RX Buffer

TX Buffer

TX Buffer

TX Buffer

LPC24xx

Advertising