AN2320 Freescale Semiconductor / Motorola, AN2320 Datasheet - Page 10

no-image

AN2320

Manufacturer Part Number
AN2320
Description
Interfacing the MCF5272 to a Standalone CAN Controller
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
82C900 Extended I/O
Both the message-specific and the CAN node specific global interrupts are distributed among eight interrupt
nodes, CAN interrupt nodes 0 – 7, via Message Configuration and Global Interrupt Node Pointer registers.
Each node can then be assigned to one of the two interrupt request outputs, OUT0 and OUT1. Requests
received from interrupt node 1 only or from interrupt nodes 1, 3, 5 and 7 combined can be output on OUT1,
and requests from interrupt node 0 only or from nodes 0, 2, 4, 6 again combined, can be output on OUT0.
It should be noted that OUT0 has dual functionality. The 82C900 has an on-chip oscillator that can be used
to generate a system clock. With an on-chip clock divider, OUT0 can be used to provide a reduced-clock
output for external devices which may need a slower clock. OUT0 is configurable via the Global Device
Control Register.
2.6
When using the SSC on the 82C900, the I/O pins of the parallel bus (P0:P7) can be configured as I/O with
extended functionality. The logic state of each pin is recorded in registers on the CAN device which can be
accessed by the CAN bus. They can be used
These I/O pins are taken out to a header on the daughtercard.
3.0 Software Development
This section outlines the software for a basic application example that sets up the 82C900 CAN controller
to transmit a message, receive a message, and interrupt the MCF5272 when a message is received. It begins
with an overview of the code required to send and receive a byte over the MCF5272 QSPI, illustrating how
data is written to and read from the 82C900 registers. It is followed by a description of the 82C900 register
set and details on how the registers are addressed when using the 82C900 SSC interface. The initialisation
of both CAN nodes is then covered and finally, in Section 3.4, “CAN Transmit and Receive,” two message
objects are set up, one assigned to CAN node A for transmit and one assigned to CAN node B for receive.
The software was verified initially by connecting the CAN transceivers on the daughtercard externally. The
transmit and receive message objects assigned to each node were given the same ID so node B would receive
the message transmitted by node A and generate an interrupt. The M5272C3 board and CAN daughter card
were then connected via a CAN bus to an MPC555 development board to test the MCF5272 CAN reference
design fully.
The code has been developed using Wind River’s Diab compiler and visionClick debugger and can be
downloaded from the MCF5272C3CAN webpage for modification for another tool chain or to be used as a
template for further development.
10
To initiate a message transfer
As GPIO where the pin state is written to or read from the CAN device registers
As a CAN status monitor to monitor the internal status of the CAN controller during message
transfer including which part of a data/remote/error frame is currently being transferred and which
value has been read by a CAN node (A,B) on the associated bus. There are also output clock lines
which are asserted high once during each bit time.
82C900 Extended I/O
Interfacing the MCF5272 to a Standalone CAN Controller
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA

Related parts for AN2320