User`s guide

Table Of Contents
C24x CAN Receive
3-11
3C24x CAN Receive
Purpose Configure a CAN mailbox to receive messages from the CAN pins and output
received messages at specified sample intervals
Library c2400dspchiplib in Embedded Target for TI C2000 DSP
Description The C24x Control Area Network (CAN) Receive block generates source code for
receiving CAN messages through a CAN mailbox. The CAN module on the DSP
chip provides serial communication capability and has six mailboxes — two
for receive, two for transmit, and two configurable for receive or transmit. The
C24x supports CAN data frames in standard or extended format.
The C24x CAN Receive block has up to two and, optionally, three output ports.
First output port is the function call port, and a function call subsystem
should be connected to this port. When a new message is received, this
subsystem is executed.
Second output port is the message data port. The received data is output in
the form of a vector of elements of the selected data type. The length of the
vector is always 8 bytes.
Third output port is optional and appears only if
Output message length is
selected.
Detailed information on the CAN module is in the TMS320LF/LC240xA DSP
Controller Reference Guide — System and Peripherals, Literature Number
SPRU357B, available at the Texas Instruments Web site.
Mailbox number — Unique number between 0 and 5 that refers to a mailbox
area in RAM. Mailboxes 0 and 1 are receive mailboxes, 2 and 3 are configurable
for receive or transmit, and 4 and 5 are transmit mailboxes. In standard data
frame mode, the mailbox number determines priority.
Message identifier Identifier of length 11 bits for standard frame size or
length 29 bits for extended frame size in decimal, binary, or hex. If in binary or
hex, use
bin2dec(' ') or hex2dec(' '), respectively, to convert the entry. The
message identifier is associated with a receive mailbox. Only messages that
match the mailbox message identifier are accepted into it.
Message type — Select Standard (11-bit identifier) or Extended
(29-bit identifier).
Mailbox: 0
C24x CAN
Receive
f(
)
Ms
g
Ms
g
Ms
g
C24x CAN Receive