Skip to Main Content Skip to Search
Product Documentation

C280x/C2803x/C28x3x/c2834x eCAN Transmit - Enhanced Control Area Network transmit mailbox

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2803x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C280x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C28x3x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2834x

Description

The C280x/C2803x/C28x3x enhanced Control Area Network (eCAN) Transmit block generates source code for transmitting eCAN messages through an eCAN mailbox. The eCAN modules on the DSP chip provide serial communication capability and have 32 mailboxes configurable for receive or transmit. The C280x/C2803x/C28x3x supports eCAN data frames in standard or extended format.

Data Vectors

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 = 2 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

Dialog Box

Module

Determines which of the two eCAN modules is being configured by this instance of the eCAN Transmit block. Options are eCAN_A and eCAN_B.

Mailbox number

Unique number from 0 to 15 for standard or from 0 to 31 for enhanced CAN mode. It refers to a mailbox area in RAM. In standard 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 coded into a message that is sent to the CAN bus.

Message type

Select Standard (11-bit identifier) or Extended (29-bit identifier).

Enable blocking mode

If selected, the CAN block code waits indefinitely for a transmit (XMT) acknowledge. If not selected, the CAN block code does not wait for a transmit (XMT) acknowledge, which is useful when the hardware might fail to acknowledge transmissions.

Post interrupt when message is transmitted

If selected, an asynchronous interrupt will be posted when data is transmitted.

Interrupt Line

Select the interrupt line the asynchronous interrupt uses. This action sets bit 2 (GIL) in the Global Interrupt Mask Register (CANGIM):

  • 1 maps the global interrupts to the ECAN1INT line.

  • 0 maps the global interrupts to the ECAN0INT line.

References

For detailed information on the eCAN module, see the following materials, available at the Texas Instruments Web site:

See Also

C280x/C2803x/C28x3x/c2834x eCAN Receive

C280x/C2802x/C2803x/C28x3x Hardware Interrupt

eCAN_A, eCAN_B

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS