Data transmit&receive from AGX Xavier to CAN bus does not work

Hello, everyone.

I am using Jetson AGX Xavier for CAN communication.
Simulink’s CAN block is used for simulation,
Through the CAN channel of Speedgoat’s IO610, we are sending can data of extended frame to bus, and when we checked through CAN analyzer, we were able to confirm that the data is sent to bus normally.
However, Jetson AGX Xavier does not receive this data.

$ sudo busybox devmem 0x0C303000 32 0x0000C400
$ sudo busybox devmem 0x0C303008 32 0x0000C458
$ sudo busybox devmem 0x0C303010 32 0x0000C400
$ sudo busybox devmem 0x0C303018 32 0x0000C458

$ sudo modprobe can
$ sudo modprobe can-raw
$ sudo modprobe mttcan

$ sudo ip link set can0 down
$ sudo ip link set can1 down
$ sudo ip link set can0 type can bitrate 500000 berr-reporting on
$ sudo ip link set can1 type can bitrate 500000 berr-reporting on
$ sudo ip link set can0 up
$ sudo ip link set can1 up

$ echo “CAN Networking Enabled”

$ exit 0

It’s set as above,
It worked well in loopback test (can0 to can0 & can1 to can1).
And when we send and receive can0 to can1 & can1 to can0 and check with cansend and candump, the result was confirmed correctly in the terminal.
However, the data sent by AGX Xavier appears as an error in CAN analyzer.
I want to know the cause of this situation and how to solve it.
I’d appreciate your help.

Sincerely,
Yujin


There is an update.

When the canh and canl of the transceiver connected to the Xavier are separated from the bus node, and the cansend is performed in the Xavier, the waveform comes out like the picture below.


(Channel 1 in yellow line is canh, channel 2 in blue line is canl, and the red line is canh-canl by math.)

By the way, when I connect to the bus node where Speedgoat and CAN Analyzer are connected, and perform cansend in Xavier, the waveform comes out dirty as shown in the picture below.

When the canh and canl of the transceiver connected to the Xavier are separated from the bus node and only the CAN analyzer is connected to it, the waveform is as follows, but when confirmed by the analyzer, it is received as an error.


I thought it might be a physical problem, so the twist and shielding effect were applied to the canh and canl lines. Then, the waveform came out well, but the difference between canh and canl was less than 2V (when the 120ohm resistances were removed, it came out close to 2V). It still appears as an error in the analyzer.

Hi kyj1005,

Are you using the devkit or custom board for AGX Xavier?
What’s the Jetpack version in use?

Have you referred to Jetson/L4T/peripheral/ - eLinux.org to setup and verify for the transaction from can0 to can1 on AGX Xavier devkit?

CAN-H should be connected with CAN-H, CAN-L should be connected with CAN-L.
You can not connect CAN-H to CAN-L.

Please share the block diagram of your connections for us better knowing your status.

1 Like

Thank you for your reply, Kevin FFF.

I’m not using devkit or custom board.

I connected 3.3V, gnd, Rx, Tx with reference to gpio,
and canh and canl to canbus, so I mean canh connected between themselves and canl between them.

This is about the oscilloscope. The red line on the oscilloscope screen calculates the voltage difference between the two signals. So you don’t have to worry about that.

And this is my circuit diagram.

I just want to know that you are using the devkit or custom board for AGX Xavier?

Thanks for sharing the connection block diagram, it looks good to me.

Is your issue specific to the data from your CAN analyzer?
(i.e. you can transmit and receive expected data from both Speedgoat and Xavier)

First caveat: The GND of ALL nodes must be connected, otherwise you won’t get a stable connection.

Second caveat: CAN is a 5V standard. Period. CAN_H and CAN_L must have an idle voltage level of 2.5V (VCC/2). In dominant state CAN_L is pulled low by 1V to 1.5V, CAN_H is pulled high by 1V to 3.5V.

Normally, CAN transceivers are 5V parts. There are CAN transceivers with dual voltage supply: 5V on pin 3 for the bus side, and 3-5V on pin 5 for the logic side. Example: Microchip MCP2562(FD). These transceivers are totally fine.

Then there are 3.3V only transceivers. Example: TI SN65HVD232D. If you supply only 3.3V to a chip it is impossible for it to output the standard 3.5V on CAN_H. You will get 3.0V if you are lucky. These transceivers bend the rules somewhat by shifting the voltage levels down by 0.5 to 1.0V in dominant state. In most cases users will get away with this, but personally I stay away from these chips if I can and use dual-supply transceivers. You do have 5V supply available on the pin header so there is absolutely no reason not to use them. I guess your signals will look much cleaner then. And don’t forget the ground connections.

Third caveat: There seems to be a minimum distance between two nodes on a bus. Read this:

2 Likes

Oh now I understand your question. I’m using devkit.

Data transmitted by Speedgoat is well received by Analyzer. However, data sent by Xavier is received as an error by Analyzer, and data sent by Analyzer is not received by Xavier.

Hello fchkjwlsq,

I’ll be careful with the ground connection. Thank you.

By the way, I’m using this chip TI SN65HVD232D, which needs 3.3V. So when it’s dominant, the voltage of CAN high is close to 3.0V.

I’ve never known that the minimum distance between bus nodes is necessary, thanks to you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.