I’m trying to use one of the call & response commands over CANbus (specifically “Get Encoder Estimates”) with an Arduino and one of the notes at the bottom of the message chart mentions needing to set an RTR bit. What is this bit and where/how do I set it? The docs for the CAN protocol don’t mention the RTR bit anywhere else.
Yeah, this is one of the problems with odrive’s CANsimple protocol IMO. It makes use of RTR as if it was just an extra bit in the arbitration ID. But really it has a special meaning and is implementation specific.
In some controllers it is handled in hardware - the CAN controller can automatically respond to an RTR message without bothering the CPU, a bit like DMA.
That said, I think it’s unlikely that due_can doesn’t support sending the RTR bit. More likely, it doesn’t support configuring the CAN hardware to reply DMA style to RTR messages.
I believe @towen is correct. Looking into the source code and according to this merged pull request, due_can has support for sending the RTR bit. Not sure about reading the RTR bit but I don’t need that functionality. Now I just need to figure out how to correctly setup the request frame to get a response. Thank you for the clarifications on RTR.