This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] TMS570LC4357: DCAN remote frame

Part Number: TMS570LC4357

Tool/software:

1. What is the remote frame used for?

2. What is the difference between remote frame and data frame?

3. Is a transmit object used for remote frame?

4. Should the DLC of remote frame be identical to the DLC of the corresponding (requested) data frame?

5. How to configure the remote frame?

6. How to configure the requested data frame to response the remote frame automatically?

    1. What is the remote frame used for?

      The intended purpose of the remote frame is to solicit the transmission of data from another node.

    1. What is the difference between remote frame and data frame?

      There are four different CAN message frames or types that can be transmitted on CAN bus: Data frame, remote frame, Error frame, and Overload frame.

      The Data frame is the most common message type, and the data frame is used by the transmitter to send a message to the receiver. The remote frame is similar to the data frame, with two important differences. First, this type of message is explicitly marked as a remote frame by a recessive RTR bit in the arbitration field, and secondly, tere is no data. The remote frame is used by a receiver to to request transmission of a message that has the same ID from the transmitter.

    1. Is a transmit object used for remote frame?

      No, the remote frame is stored in a receive object. Setting the TxRqst bit of a receive object will cause the transmission of a Remote Frame with the receive object’s identifier. This Remote Frame triggers the other CAN node to start the transmission of the matching Data Frame.

    1. Should the DLC of remote frame be identical to the DLC of the corresponding (requested) data frame?

      No, the DLC of remote frame doesn’t affect the data length code (DLC) of the requested data frame. The requested CAN node needs to knw the correct DLC.

    1. How to configure the remote frame?

      The message object for the remote frame should be configured as “receive” (DIR=0), but it will be transmitted.

      For F28x devices: Initialize the mailbox used for sending the remote frame and receiving the corresponding data frame

                CAN_setupMessageObject(CANA_BASE, TX_MSG_OBJ_ID, 0x123, CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RX, 0, 
                                                             CAN_MSG_OBJ_NO_FLAGS, MSG_DATA_LENGTH);

    1. How to configure the requested data frame to response the remote frame automatically?

      To receive a remote frame, the message object should be configiued as transmitter with RmtEN enabled. The data field should be filled before enabling the RmtEN (remote).

                For F28x devices, Initialize the mailbox used for responding to the remote frame Message Object Parameters:

                CAN_setupMessageObject(CANB_BASE, TX_MSG_OBJ_ID, 0x123, CAN_MSG_FRAME_STD, CAN_MSG_OBJ_TYPE_RXTX_REMOTE, 0,
                                                            CAN_MSG_OBJ_NO_FLAGS, MSG_DATA_LENGTH);

    1. When a Remote Frame is received, three different configurations of the matching message object have to be considered:

      1. Dir = 1 (direction = transmit), RmtEn = 1, UMask = 1 or 0. The TxRqst bit of this message object is set at the reception of a matching Remote Frame. The rest of the message object remains unchanged. 2. Dir = 1 (direction = transmit), RmtEn = 0, UMask = 0. The Remote Frame is ignored, this message object remains unchanged. 3. Dir = 1 (direction = transmit), RmtEn = 0, UMask = 1. The Remote Frame is treated similar to a received Data Frame. At the reception of a matching Remote Frame, the TxRqst bit of this message object is reset. The arbitration and control bits (Identifier + IDE + RTR + DLC) from the shift register are stored in the message object in the Message RAM and the NewDat bit of this message object is set. The data bytes of the message object remain unchanged.