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.

TMS570LC4357: CAN RTR Handling

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hello,

We have a project in which we are implementing a CAN interface. The protocol for this interface is based on the CANopen protocol concepts of PDOs, SDOs, etc. We have four TX PDOs which I have set up in HALCoGen as four separate TX message boxes with their respective IDs. The protocol requires that the device responds to an RTR frame received on TX PDO1 by sending all four TX PDOs.

However, I have noticed RTR is handled automatically by the CAN module upon receiving the RTR and no interrupt is triggered by the received remote frame. Is there any way to disable this automatic response and handle the response in our code?

Thank you.

  • Hi,

    The intended purpose of the remote frame is to solicit the transmission of data from another node. The remote frame triggers the other CAN node to start the transmission of the
    matching Data Frame.

    The remote frame is stored in a receive object rather than a transmit object. Setting the TxRqst bit of a receive object will cause the transmission of a Remote Frame with the receive object’s identifier. 

    The message object for the remote frame should be configured as “receive” (DIR=0):

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

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

    27.8.8 Reception of Remote Frames of TRM

    https://www.ti.com/lit/ug/spnu563a/spnu563a.pdf

  • Thank you for the quick response. I am already aware of how to configure RTR support in HALCoGen. I just want to know if there is a way I could receive the RTR and handle it myself in code rather than it being handled by the CAN module. The section you linked is very interesting, specifically this:

    Would this trigger an interrupt? I was hoping I could maybe poll TxRqst if receiving the remote frame set it but it seems to reset it instead.

  • Yes, you can receive the remote frame, and transmit the data frame manually.

    If the RmtEn = 0 of the data frame, the data frame will not be transmitted automatically when the remote frame is received.