All of received CAN messages are errors

Dear all,

We have an issue with sending and receiving CAN messages. We are using TJA1040 as CAN transceiver to connect to Jetson TX2. There are configurations for CAN interface

sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
sudo ip link set up can1

All of received CAN messages were errors as below

can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP NOARP  MTU:72  Metric:1
          RX packets:6083 errors:6080 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:48664 (48.6 KB)  TX bytes:0 (0.0 B)
          Interrupt:172

Try to run dmesg to capture more detail errors

[  134.583120] mttcan c320000.mttcan can1: Format Error Detected
[  134.597341] mttcan c320000.mttcan can1: Stuff Error Detected
[  134.603100] mttcan c320000.mttcan can1: Format Error Detected
[  134.617340] mttcan c320000.mttcan can1: Stuff Error Detected
[  134.623080] mttcan c320000.mttcan can1: Format Error Detected
[  134.637337] mttcan c320000.mttcan can1: Stuff Error Detected
[  134.643088] mttcan c320000.mttcan can1: Format Error Detected

And this is probed signal on CAN1_RX pin (output from CAN receiver(TJA1040) to TX2)

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

We need some more logs to analyze further.
Can you please help sending full log and also please specify the type of can messages are you using at your setup?

Also is it verified that the CAN transceiver is physically connected properly over Tegra, as sometime we have seen multiple times that even though the connection looks fine still some loose connection can make the setup wrong. It is suggested to keep the transceiver with proper soldering.

Thanks & Regards,
Sandipan

Hi Sandipan,

Thank for your reply.

What exactly full log that you want to see and how can I get this? And what do you mean about type of can messages?

How can we check the physical connected properly, due to there were many received CAN messages even though all of them were errors so I though physical was connected.

Best Regards,
Vu Nguyen

Hi Sandipan,

We checked it again and found out that our CAN generation has something wrong. So we used the other CAN message generation then everything worked well except sending from can0 even though sending at can1 did not have any error. I need to check more about sending from can0 interface.

Thanks and Best Regards,
Vu Nguyen

Hi Vu Nguyen,

Thank you for keeping updated.

Please note:
The message type I meant was, how are you generating message and other required parameters.

Sounds good you have overcome the configuration problems.

Thanks & Regards,
Sandipan

Hi Sandipan,

So now we have problem with sending can messages at can0 interface, even though it worked well at can1. Both of them used same CAN transceiver(TJA1040). Do you have any advice?

Thanks and Best Regards,
Vu Nguyen

Any type of loose connection or faulty hardware may lead to the issue.

I would suggest to alter the transceivers and observe if any changes.
Ideally if the transceiver is faulty, then can0 should be able to function and can1 will be a defaulter.
If this is not the case then you need to look into the controller logs.

Thanks & Regards,
Sandipan

Hi Sandipan,

After modify a little on hardware both CAN interfaces could work well.
Thank very much for your support.

Best Regards,
Vu Nguyen

Not having any luck either. I keep getting error on each CAN BUS an I am measuring right at the pin (just probing the interface between Xavier and the CAN Transciever). I see some motion and then it goes into error state and doesn’t recover until next boot.
ANything missing?

Hi wegunterjr,

Please help to open a new topic for your issue. Thanks

@kayccc already did:

Got it to work and can get it to work every time.
I had to include a transceiver that was enabled to prevent the errors on the Xavier CAN Bus side.
Thanks!