30.01.2015 Views

UM10211 - Standard ICs

UM10211 - Standard ICs

UM10211 - Standard ICs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

NXP Semiconductors<br />

<strong>UM10211</strong><br />

Chapter 12: LPC2300 CAN1, 2<br />

The CAN Controller wakes up (and sets WUI in the CAN Interrupt register if WUIE in the<br />

CAN Interrupt Enable register is 1) in response to a) a dominant bit on the CAN bus, or b)<br />

software clearing SM in the CAN Mode register. A sleeping CAN Controller, that wakes up<br />

in response to bus activity, is not able to receive an initial message, until after it detects<br />

Bus_Free (11 consecutive recessive bits). If an interrupt is pending or the CAN bus is<br />

active when software sets SM, the wake-up is immediate.<br />

7.3 Interrupts<br />

Each CAN Controller produces 3 interrupt requests, Receive, Transmit, and “other status”.<br />

The Transmit interrupt is the OR of the Transmit interrupts from the three Tx Buffers. Each<br />

Receive and Transmit interrupt request from each controller is assigned its own channel in<br />

the Vectored Interrupt Controller (VIC), and can have its own interrupt service routine. The<br />

“other status” interrupts from all of the CAN controllers, and the Acceptance Filter LUTerr<br />

condition, are ORed into one VIC channel.<br />

7.4 Transmit priority<br />

If the TPM bit in the CANxMOD register is 0, multiple enabled Tx Buffers contend for the<br />

right to send their messages based on the value of their CAN Identifier (TID). If TPM is 1,<br />

they contend based on the PRIO fields in bits 7:0 of their CANxTFS registers. In both<br />

cases the smallest binary value has priority. If two (or three) transmit-enabled buffers have<br />

the same smallest value, the lowest-numbered buffer sends first.<br />

The CAN controller selects among multiple enabled Tx Buffers dynamically, just before it<br />

sends each message.<br />

8. Centralized CAN registers<br />

For easy and fast access, all CAN Controller Status bits from each CAN Controller Status<br />

register are bundled together. Each defined byte of the following registers contains one<br />

particular status bit from each of the CAN controllers, in its LS bits.<br />

All Status registers are “read-only” and allow byte, half word and word access.<br />

8.1 Central Transmit Status Register (CANTxSR - 0xE004 0000)<br />

Table 212. Central Transit Status Register (CANTxSR - address 0xE004 0000) bit description<br />

Bit Symbol Description Reset<br />

Value<br />

0 TS1 When 1, the CAN controller 1 is sending a message (same as TS in the 0<br />

CAN1GSR).<br />

1 TS2 When 1, the CAN controller 2 is sending a message (same as TS in the 0<br />

CAN2GSR)<br />

7:2 - Reserved, user software should not write ones to reserved bits. The NA<br />

value read from a reserved bit is not defined.<br />

8 TBS1 When 1, all 3 Tx Buffers of the CAN1 controller are available to the CPU 1<br />

(same as TBS in CAN1GSR).<br />

9 TBS2 When 1, all 3 Tx Buffers of the CAN2 controller are available to the CPU<br />

(same as TBS in CAN2GSR).<br />

1<br />

<strong>UM10211</strong>_1<br />

© NXP B.V. 2007. All rights reserved.<br />

User manual Rev. 01 — 27 March 2007 232 of 613

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!