2025-05-22 1:30 PM - last edited on 2025-05-23 2:24 AM by Andrew Neil
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).
2025-05-23 2:19 AM - edited 2025-05-23 2:52 AM
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.
2025-05-23 2:35 PM - edited 2025-05-23 3:17 PM
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!