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: DCAN message box configuration for tx remote ONLY

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hello,

 

Been playing with the DCAN a bit. I know the message boxes are dual purposed for tranmission and receiving. How do you configure a message box for tx remote ONLY? I've configured as a recieve object for data frames and marked the filter (umask) as unused. I DO NOT want to receive in messages, just want to use the message box as a dedicated tranmitter of REMOTE frames. I've manipulated the mdir and mxtd, though i always receive an extended id message when it matches the configured id.

I've seen

https://www.ti.com/lit/an/sprace5a/

and it doesn't appear to be much help in the matter. Makes me think what I'm trying to accomplish is IMPOSSIBLE.

Ideally I'd have message boxes configured for recieving only (I would poll these in my application). Then I'd have my message boxes dedicated tx remote frames. Receiving messages in thes tx-remote-frame dedicated is undesired, as I would have to expand my polling to accomodate the potential received message. I know I can place a catch-all message box in-between...the receiving message boxes and the tx dedicated mailboxes but that a WORKAROUND.

Regards,


Craig

  • Hi Craig,

    1. Difference between remote frame and data frame

    • The remote frame is explicitly marked as a remote frame by a recessive RTR bit in the arbitration field
    • There is no data. The remote frame is used by a receiver to request transmission of a message that has the same ID from the transmitter.

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

    3. 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.

    4. Configure the remote frame

    The message object for a remote frame should be configured as “receive” (DIR=0). Please refer to the example code in example folder.

    5. 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).

    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.

    1. Dir = 1 (direction = transmit), RmtEn = 0, UMask = 0. The Remote Frame is ignored, this message object remains unchanged.

    ^^That did it. For posterity's sake: 

    Configure the the mailbox like a single receive object for remote frames as described in 27.7.4 of reference manual, but set Umask to 0. 

    The bolded statement is found at 27.8.8

    This will give you a mailbox that will not receiving anything but allows you to transmit remote frame. Thanks QJ!



  • Looking back, I do have some questions in regards to the HALCOGEN configuration.

    CAN_TX enabled
    RTR enabled

    -Configured as TRANSMIT OJBECT, Tranmit data message, on matching remote response (matching messages are not stored)

    CAN_TX enabled
    RTR disabled

    -Transmits data message and receives remote messages (matching messages are stored and thus can be read by user/CPU)

    CAN_RX enabled
    RTR enabled

    -Configured as RECEIVE OBJECT-Receives DATA messages, sends remote messages

    How do you configure a Receive REMOTE message? The buffer type item outlined in the technical reference manual. This requires the the message to be configured with DIR = 1 (transmit), though how this tranlates to Halcogen is unclear.

    Maybe:
    CAN_RX enabled    (This won't work if it alter the Dir bit receive)
    RTR disabled

  • In my example, DCAN1 transmits 2 remote frames from msgbox1 (ID=0x123) and msgbox2(ID=0x985). The remote object is RX. DCAN2 msg box1 and msg2 receive the remote frames and transmit the requested data. The request data object is TX.

    DCAN1 configuration:

    DCAN2 configuration: