Xavier cansend problem

Hello ,
I have a problem with CAN communication on Nvidia Jetson Xavier, I have followed this tutorial :

I am able to read bus, with candump but I am not able to send message to the network with cansend. Also when I am reading the network with candump, stop reading, try to send some data with cansend, the bus gets stuck. I am no longer able to even read data when I write candump can0.
I have also tried to configure pins to CAN with pinmux, following this tutorial :
https://elinux.org/Jetson/AGX_Xavier_CAN
But I have the same problem.
When I write cansend, turn down, and turn up the CAN bus I can see with the command
ip -details -statistics link show can0
that the message I have sent is dropped.
Can you please help me to solve this problem ?
Thank you for your help

Hi,
Did you use RT patch for kernel?
If not, can you please share your setup and the command outputs in the sequence:
ip -d -s link show can0
candump can0 &
cansend can0
ip -d -s link show can0

Thanks,
Shubhi

Hi,
We are not using RT patch.
Command outputs sequence screen: https://imgur.com/a/BOA30iC
Thanks

Hi,

I checked the putputs. CAN state went to BUS-OFF.
Can you please share little more details related to your setup. How did you connect CAN0 and CAN1? which transceiver you are using? how many nodes are attached on CAN bus?
Please also check if all the connections are properly made.

Thanks,
Shubhi

Hi Shubi,
We have connected pins on jetson xavier according to mentioned tutorial, so pins 29 & 31 on nvidia to our transceiver (TJA 1050, we have also tried TJA 1042) pins TXD & RXD as long as we are able to read the bus at first, I am sure we have connected it correctly ( but we have also tried to switch them to be absolutely sure ) pin S is connected to the ground on xavier, GND & VCC to nvidia pins for supply. Our network consists of no more than 25 CAN devices. We have also tried CAN 1 connection on xavier ( pins 37 & 33) , set the registers and bus up, but no success. When se connect pins from nvidia to osciloscope, we do not see any messages. We have also tried to use logic analyzer to look at CAN controller output from nvidia, also nothing. We have tried with termination resistor and also without it, just to be sure that we are not doing some mistake. Still nothing
Thank you very much for your help

Hi,

I have a question. How are you able to dump messages if you are not able to send? While using cansend, your state is going to BUS-OFF but you are able to see messages sent using cansend in candump?
It is not very clear to me. Can you please explain the scenario?

Hi,
I change registers, mount CAN controller set the link can0 up and then I write candump can0 to the terminal and I am able to see can messages on the bus (from other devices on the network) when I use command cansend I am immediately no more able to read the bus, and neither my message is not sent, so I don’t see it on other devices which are on the bus also. And that is my question how is it possible? Cansend seems to save the message to some buffer or something and don’t send them at all to the network. When I use command cansend everything gets stuck. Candump doesn’t read the bus, cansend doesn’t send anything to the bus.

Hi,

Ok so you are saying that you are able to read messages on xavier which are sent through other devices attached on BUS but when you send message from xavier on BUS then it is a problem.
Can you try sending message from one CAN node (of Xavier) to another CAN node(of Xavier) and keeping on these nodes on bus? This way, we will be sure that problem is with xavier or with the setup being used.
Let me know the results.

Thanks,
Shubhi

Hi,

we have tried once again with other can transceiver mcp2551, we have remade our whole connection and everything works correctly now, so the problem was probably with HW connection - Rs pin needs to be grounded via 10R resistor, our connection before was done without resistor.

Thank you very much for your time and your help