01.08.2013 Views

Chapter 23 Controller Area Network (CAN).pdf

Chapter 23 Controller Area Network (CAN).pdf

Chapter 23 Controller Area Network (CAN).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Functional Description www.ti.com<br />

<strong>23</strong>.3.14.1 Configuration of a Transmit Object for Data Frames<br />

Table <strong>23</strong>-4 shows how a transmit object can be initialized.<br />

Table <strong>23</strong>-4. Initialization of a Transmit Object<br />

MsgVal Arb Data Mask EoB Dir NewDat MsgLst RxIE TxIE IntPnd RmtEn TxRqst<br />

1 appl. appl. appl. 1 1 0 0 0 appl. 0 appl. 0<br />

The arbitration bits (ID[28:0] and Xtd bit) are given by the application. They define the identifier and type of<br />

the outgoing message. If an 11-bit identifier (standard frame) is used (Xtd = ‘0’), it is programmed to<br />

ID[28:18]. In this case, ID[17:0] can be ignored.<br />

The data registers (DLC[3:0] and Data0-7) are given by the application. TxRqst and RmtEn should not be<br />

set before the data is valid.<br />

If the TxIE bit is set, the IntPnd bit will be set after a successful transmission of the message object.<br />

If the RmtEn bit is set, a matching received remote frame will cause the TxRqst bit to be set; the remote<br />

frame will autonomously be answered by a data frame.<br />

The mask bits (Msk[28:0], UMask, MXtd, and MDir bits) may be used (UMask=’1’) to allow groups of<br />

remote frames with similar identifiers to set the TxRqst bit. The Dir bit should not be masked. For details,<br />

see Section <strong>23</strong>.3.15.8. Identifier masking must be disabled (UMask = ‘0’) if no remote frames are allowed<br />

to set the TxRqst bit (RmtEn = ‘0’).<br />

<strong>23</strong>.3.14.2 Configuration of a Transmit Object for Remote Frames<br />

It is not necessary to configure transmit objects for the transmission of remote frames. Setting TxRqst for<br />

a receive object causes the transmission of a remote frame with the same identifier as the data frame for<br />

which this receive object is configured.<br />

<strong>23</strong>.3.14.3 Configuration of a Single Receive Object for Data Frames<br />

Table <strong>23</strong>-5 shows how a receive object for data frames can be initialized.<br />

Table <strong>23</strong>-5. Initialization of a single Receive Object for Data Frames<br />

MsgVal Arb Data Mask EoB Dir NewDat MsgLst RxIE TxIE IntPnd RmtEn TxRqst<br />

1 appl. appl. appl. 1 0 0 0 appl. 0 0 0 0<br />

The arbitration bits (ID[28:0] and Xtd bit) are given by the application. They define the identifier and type of<br />

accepted received messages. If an 11-bit Identifier (standard frame) is used (Xtd = ‘0’), it is programmed<br />

to ID[28:18]. In this case, ID[17:0] can be ignored. When a data frame with an 11-bit Identifier is received,<br />

ID[17:0] is set to ‘0’.<br />

The data length code (DLC[3:0]) is given by the application. When the message handler stores a data<br />

frame in the message object, it will store the received data length code and eight data bytes. If the data<br />

length code is less than 8, the remaining bytes of the message object may be overwritten by non specified<br />

values.<br />

The mask bits (Msk[28:0], UMask, MXtd, and MDir bits) may be used (UMask = ’1’) to allow groups of<br />

data frames with similar identifiers to be accepted. The Dir bit should not be masked in typical<br />

applications. If some bits of the mask bits are set to “don’t care,” the corresponding bits of the arbitration<br />

register will be overwritten by the bits of the stored data frame.<br />

If the RxIE bit is set, the IntPnd bit will be set when a received data frame is accepted and stored in the<br />

message object.<br />

If the TxRqst bit is set, the transmission of a remote frame with the same identifier as actually stored in the<br />

arbitration bits will be triggered. The content of the arbitration bits may change if the mask bits are used<br />

(UMask = ’1’) for acceptance filtering.<br />

4056 <strong>Controller</strong> <strong>Area</strong> <strong>Network</strong> (<strong>CAN</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!