cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

2 REPLIES 2
mƎALLEm
ST Employee

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.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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!