Chapter 18: lpc24xx can controllers can1/2, How to read this chapter, Basic configuration – NXP Semiconductors LPC24XX UM10237 User Manual

Page 467: Can controllers

Advertising
background image

UM10237_4

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

User manual

Rev. 04 — 26 August 2009

467 of 792

1.

How to read this chapter

The CAN controller in available on parts LPC2458 and LPC2460/68/70/78.

2.

Basic configuration

The CAN1/2 peripherals are configured using the following registers:

1. Power: In the PCONP register (

Table 4–63

), set bits PCAN1/2.

Remark: On reset, the CAN1/2 blocks are disabled (PCAN1/2 = 0).

2. Peripheral clock: In the PCLK_SEL0 register (

Table 4–56

), select PCLK_CAN1/2 and,

for the acceptance filter, PCLK_ACF. PCLK_CAN1/2 and PCLK_ACF must be set to
the same value.

Remark: If CAN baudrates above 100 kbit/s (see

Table 18–425

) are needed, do not

select the IRC as the clock source (see

Table 4–42

).

3. Wakeup: Use the INTWAKE register (

Table 4–62

) to enable the CAN controllers to

wake up the microcontroller from Power-down mode.

4. Pins: Select CAN1/2 pins and pin modes in registers PINSELn and PINMODEn (see

Section 9–5

).

5. Interrupts: CAN interrupts are enabled using the CAN1/2IER registers

(

Table 18–424

). Interrupts are enabled in the VIC using the VICIntEnable register

(

Table 7–106

).

6. CAN controller initialization: see CANMOD register (

Section 18–8.1

).

3.

CAN controllers

Controller Area Network (CAN) is the definition of a high performance communication
protocol for serial data communication. The CAN Controller is designed to provide a full
implementation of the CAN-Protocol according to the CAN Specification Version 2.0B.
Microcontrollers with this on-chip CAN controller are used to build powerful local networks
by supporting distributed real-time control with a very high level of security. The
applications are automotive, industrial environments, and high speed networks as well as
low cost multiplex wiring. The result is a strongly reduced wiring harness and enhanced
diagnostic and supervisory capabilities.

The CAN block is intended to support multiple CAN buses simultaneously, allowing the
device to be used as a gateway, switch, or router among a number of CAN buses in
various applications.

The CAN module consists of two elements: the controller and the Acceptance Filter. All
registers and the RAM are accessed as 32 bit words.

UM10237

Chapter 18: LPC24XX CAN controllers CAN1/2

Rev. 04 — 26 August 2009

User manual

Advertising