CAN RTR auto-reply not sending DLC | Cypress Semiconductor
CAN RTR auto-reply not sending DLC
I'm experimenting with the auto RTR function. I have it working in the sense that when node A sends msg ID 0x001 with the RTR bit set, I have node B automatically sending a response that A picks up.
What is not working is that I get no data. Node B initializes rx buffer 0 with a DLC of 8 and DH/DL set to 0x1122334455667788. I can verify this by looking at CAN_RX in the memory view of the debugger:
0x4000a0a0: 0080001a 00200000 44332211 88776655 0x4000a0b0: 001ffff9 00200002 ffffffff 00000000
The message returned by node B is correct except that the DH/DL registers are zeroed. I have rx buffer 1 set up to match the message ID (without RTR set):
0x4000a0c0: 00000029 003ffff8 00000000 00000000 0x4000a0d0: 001ffff9 00200000 ffffffff 00000000
(note that the received DLC is 0). I thought perhaps node A had to set the desired DLC on the outgoing RTR frame, but that did not help.
Is it not possible to send back data in an automatic RTR response? I am setting this data before I ever receive a message, and it does not change during the life of the program. The auto-RTR reply section in the TRM states that the contents of the buffer which received the RTR frame will be sent, but I am not seeing this.