English
Language : 

LM3S9B81 Datasheet, PDF (754/1155 Pages) Texas Instruments – Stellaris® LM3S9B81 Microcontroller
Controller Area Network (CAN) Module
Figure 18-2. CAN Data/Remote Frame
Start
Of Frame
Remote
Transmission
Request
Bus
Idle
S
O
F
Message Delimiter
R
T
R
Control
Field
Data Field
Number 1
Of Bits
11 or 29
16
0 . . . 64
Delimiter
Bits
CRC
A
Sequence C
K
EOP IFS Bus
Idle
15 1 1 1
7
3
Arbitration Field
CRC Sequence
CRC
Field
End of
Frame
Field
Interframe
Field
Bit Stuffing
CAN Data Frame
Acknowledgement
Field
18.3.1
The protocol controller transfers and receives the serial data from the CAN bus and passes the data
on to the message handler. The message handler then loads this information into the appropriate
message object based on the current filtering and identifiers in the message object memory. The
message handler is also responsible for generating interrupts based on events on the CAN bus.
The message object memory is a set of 32 identical memory blocks that hold the current configuration,
status, and actual data for each message object. These memory blocks are accessed via either of
the CAN message object register interfaces.
The message memory is not directly accessible in the Stellaris® memory map, so the Stellaris® CAN
controller provides an interface to communicate with the message memory via two CAN interface
register sets for communicating with the message objects. The message object memory cannot be
directly accessed, so these two interfaces must be used to read or write to each message object.
The two message object interfaces allow parallel access to the CAN controller message objects
when multiple objects may have new information that must be processed. In general, one interface
is used for transmit data and one for receive data.
Initialization
To use the CAN controller, the peripheral clock must be enabled using the RCGC0 register (see
page 166). In addition, the clock to the appropriate GPIO module must be enabled via the RCGC2
register (see page 183). To find out which GPIO port to enable, refer to Table 23-4 on page 1036. Set
the GPIO AFSEL bits for the appropriate pins (see page 318). Configure the PMCn fields in the
GPIOPCTL register to assign the CAN signals to the appropriate pins. See page 336 and Table
23-5 on page 1043.
Software initialization is started by setting the INIT bit in the CAN Control (CANCTL) register (with
software or by a hardware reset) or by going bus-off, which occurs when the transmitter's error
counter exceeds a count of 255. While INIT is set, all message transfers to and from the CAN bus
are stopped and the CANnTX signal is held High. Entering the initialization state does not change
the configuration of the CAN controller, the message objects, or the error counters. However, some
configuration registers are only accessible while in the initialization state.
754
June 29, 2010
Texas Instruments-Advance Information