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.

LAUNCHXL-F28P65X: Need to send/receive CAN remote and data frame with same id

Part Number: LAUNCHXL-F28P65X

Tool/software:

Hi,

I need to use the same three CAN IDs for both remote and data frames.

When I receive a remote frame, I need to check the ID and, based on that, send a data frame with the same ID.

In the first iteration, I receive a remote frame and send a data frame with the same ID.

In the next iteration, I am not receiving the remote frame(receive interrupt is coming, not message object interrupt).

If I send data frame with any other id then I am able to receive remote frame.

  1. Any idea what could be causing this issue?
  • Hi Shashi,

    Is the data frame uploaded to the message object in message RAM for the 2nd iteration before receiving the remote frame? If UMASK=1, you don't have to use the same ID for data frame by configuration Msk[28:0].

    25.11.8 Reception of Remote Frames

    When a remote frame is received, three different configurations of the matching message object are 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

  • Hello QJ Wang,

    Thanks for the response. 

    But my current application demands 3 remote frames with auto reply, along with data Tx and data Rx frames.

    what is happening - whenever remote request comes, the auto reply from the buffer (IF1 data reg bits) gets transmitted on the bus, but based on different events data in the buffer will be updated (here arbitration bit is also updated based on the message id of remote request) and new data should be send as auto reply of remote frame.

    Above scenario is working fine until there comes a data frame on the bus and transmitting data to the bus using CAN_sendMessage api from can.c file.

    after transmitting the data frame on the bus, auto response stops working and for remote request, there is no response.

    It could be due to corruption in some register configurations, tried disabling and enabling interrupt before and after write of IF1 reg but the behavior remains same.

    Looking forward for your response on what we are missing.

    Thanks.

  • Hi Sonali,

    Please check EmtEn bit of IFxCTL register of the remote frame and data frame to make sure the "remote enable" bit is not cleared.

  • Hi Sonali,

    After the first data frame has been transmitted, you need to update the data frame with new data, ID, mast, and the RmtEN.