Skip to main content
Explorer
May 22, 2025
Solved

I want to learn CAN RTR (Remote Transmission Request) basic coding

  • May 22, 2025
  • 1 reply
  • 540 views

 I've be trying to learn CAN for the past few days for a project using 2 Nucleo F103RB and 2 CAN transceivers. I made a very basic code using normal mode and without using RTR. Now I want to learn how to code using RTR, can someone help me please?

(I already know what is RTR, I want to use it and can't find where to learn it).

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Sorry, I didn't catch the scenario.


    @Bruno_Hessman_Ramos wrote:

    the receiver(RTR)is going to send a request with an ID using TxHeader.StdId = ID right?With this id,the other other board will see the id and send a message,wich the reciver can store right? Thank you for the answer!


    The receiver will receive an RTR message with an ID (standard or extended). It will answer by a data message that the sender needs to catch (the filter needs to be configured accordingly in both sides: sender (ID) and the receiver (RTR+ID)).

    mALLEm_0-1748087231364.png

    Hope it's clear now.

    1 reply

    Technical Moderator
    May 23, 2025

    Hello,

    Since you know what the RTR is, don't expect to use it to make the receiver to automatically responds the request.

    You can send an RTR frame with this parameter:

    TxHeader.RTR = CAN_RTR_REMOTE;

    On the receive, if you want, to set one of the filters to accept the RTR frames, while received you need to send back a frame manually.

     

    Explorer
    May 23, 2025

    I am very new on coding and CAN,so can I respond the frame using the button in the Nucleo F103RB?For example,the receiver(RTR)is going to send a request with an ID using TxHeader.StdId = ID right?With this id,the other other board will see the id and send a message,wich the reciver can store right? Thank you for the answer!

    mƎALLEmAnswer
    Technical Moderator
    May 24, 2025

    Sorry, I didn't catch the scenario.


    @Bruno_Hessman_Ramos wrote:

    the receiver(RTR)is going to send a request with an ID using TxHeader.StdId = ID right?With this id,the other other board will see the id and send a message,wich the reciver can store right? Thank you for the answer!


    The receiver will receive an RTR message with an ID (standard or extended). It will answer by a data message that the sender needs to catch (the filter needs to be configured accordingly in both sides: sender (ID) and the receiver (RTR+ID)).

    mALLEm_0-1748087231364.png

    Hope it's clear now.