| Target Support Package™ TC2 | ![]() |
c281xdspchiplib in Target Support Package TC2 software
The C281x enhanced Control Area Network (eCAN) Transmit block generates source code for transmitting eCAN messages through an eCAN mailbox. The eCAN module on the DSP chip provides serial communication capability and has 32 mailboxes configurable for receive or transmit. The C28x supports eCAN data frames in standard or extended format.
Note Fixed-point inputs are not supported for this block. |
The length of the vector for each transmitted mailbox message is 8 bytes. Input data are always right-aligned in the message data buffer. Only uint16 (vector length = 4 elements) or uint32 (vector length = 8 elements) data are accepted. The following examples show how the different types of input data are aligned in the data buffer
For input of type uint32,
inputdata [0] = 0x12345678
the data buffer is:
data buffer[0] = 0x78 data buffer[1] = 0x56 data buffer[2] = 0x34 data buffer[3] = 0x12 data buffer[4] = 0x00 data buffer[5] = 0x00 data buffer[6] = 0x00 data buffer[7] = 0x00
For input of type uint16,
inputdata [0] = 0x1234
the data buffer is:
data buffer[0] = 0x34 data buffer[1] = 0x12 data buffer[2] = 0x00 data buffer[3] = 0x00 data buffer[4] = 0x00 data buffer[5] = 0x00 data buffer[6] = 0x00 data buffer[7] = 0x00
For input of type uint16[2], which is a two-element vector,
inputdata [0] = 0x1234 inputdata [1] = 0x5678
the data buffer is:
data buffer[0] = 0x34 data buffer[1] = 0x12 data buffer[2] = 0x78 data buffer[3] = 0x56 data buffer[4] = 0x00 data buffer[5] = 0x00 data buffer[6] = 0x00 data buffer[7] = 0x00

Unique number between 0 and 15 for standard or between 0 and 31 for enhanced CAN mode. It refers to a mailbox area in RAM. In standard mode, the mailbox number determines priority.
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 coded into a message that is sent to the CAN bus.
Select Standard (11-bit identifier) or Extended (29-bit identifier).
If selected, the CAN block code waits indefinitely for a transmit (XMT) acknowledge. If cleared, the CAN block code does not wait for a transmit (XMT) acknowledge, which is useful when the hardware might fail to acknowledge transmissions.
If selected, an asynchronous interrupt is posted when data is transmitted.
Note For information about setting the timing parameters of the CAN module, see Configuring Timing Parameters for CAN Blocks. |
For detailed information on the eCAN module, see TMS320F28x DSP Enhanced Control Area Network (eCAN) Reference Guide, Literature Number SPRU074A, available at the Texas Instruments website.
![]() | C281x eCAN Receive | C281x GPIO Digital Input | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |