CAN Interface not behaving right on AGX

Can bus need 120Ohm termination, make sure add on both far end, it’s required in ISO 11898.

1 Like

Thanks for the reply @JimWang and @VickNV.

We did one more experiment. Below is the setup:

In this experiment, We see data from both the IMUs on the Linux Host when Drive AGX is not connected to the bus. As soon as we connected Drive AGX we stop seeing data from the IMUs to the Linux Host. When we remove the Drive AGX, the traffic was back up.

Note: For termination we are using one of this at each end: CAN Terminator with 120 Ohm Resistor – Grid Connect. And none of the IMUs have in-built termination.

Can you help us how else we can debug this, what else we can try to narrow-down the problem?

Thanks in advance.

Hi @rborad,

What does “Drive AGX (IMU1 DB9)” mean? the IMU connector on the cable harness? Why don’t you use the CAN connector on the cable harness?

Thanks for the reply @VickNV .

It was a mistake in tat diagram, this is the updated diagram. I am connecting to CAN1 DB9 connector on harness. Which has two DB9 labels Can1 and Can 2. From those labels I am using Can1 pin 7/ pin 2. Sorry for misunderstanding. I am aware of the fact that IMU connector uses UART.


Without IMU1 and IMU2 CAN devices on the CAN bus, is the CAN communication between Drive AGX and the Linux host (via the CANUSB transceiver) working?

When I connect Drive AGX and Linux host, and send data from Linux using cansend, I see the message on AGX candump.

When I connect my IMU to above setup (IMU + Linux + AGX), the IMU sends some data and stops sending data after few messages. But again, a message using cansend from Linux go though to the AGX. Then I restarted my IMU and same thing again, sent some data and then stopped but Linux - AGX CAN communication was working.

When I connect the IMU to the Linux, i see continuous data sent from the IMU to the linux candump without any problem.

does dmesg tells you something when this kind of error occurs? I forgot to send dmesg after this experiment. I will do that next time and share the screenshot. That might help. Thanks.

Edit: Here is the dmesg output form DriveAGX, this is just the tail of output. The output is full of these errors.

[1718433.055336] mttcan c320000.mttcan can1: Format Error Detected
[1718433.057517] mttcan c320000.mttcan can1: Format Error Detected
[1718433.059065] mttcan c320000.mttcan can1: Format Error Detected
[1718433.060638] mttcan c320000.mttcan can1: Format Error Detected
[1718433.062203] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.063772] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.065318] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.066872] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.068426] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.074106] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.075687] mttcan c320000.mttcan can1: Format Error Detected
[1718433.077274] mttcan c320000.mttcan can1: Format Error Detected
[1718433.078838] mttcan c320000.mttcan can1: Format Error Detected
[1718433.080407] mttcan c320000.mttcan can1: Format Error Detected
[1718433.081967] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.083524] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.085082] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.086674] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.088218] mttcan c320000.mttcan can1: Stuff Error Detected
[1718433.214826] mttcan c320000.mttcan can1: Stuff Error Detected

@VickNV, @JimWang , @shayNV, @LukeNV

In above reply I tried Drive AGX with Linux PC and they were able to communicate over the CAN network. With the same setup, removing Linux PC and Adding IMU to the network at the same DB9 connector gives Stuff errors and Format errors. Heres the picture of my setup if any of you can help me verify the setup.

Two ends are terminators I mentioned above.

From the middle two DB9s, one is connected to my IMU and other one to the Drive AGX.

What can i do to debug this issue? I do not have access to DriveAGX directly and I am getting help of a friend who is running these experiments for me. Its very inconvenient but I dont think there is any other way. I just want to test the plugin i wrote and see if it works with my IMU. Can I rent DriveAGX from NVIDIA?

Thanks in advance.
Rishit

CC: @rkomarabathuni

Please refer to “Setting up SocketCAN Interface” topic in the document (especially the notes) and check if all Xavier/Aurix/IMU use same bit timing parameters.

Also could you help to check your aurix firmware version?

Sorry for delayed response. Below is the Firmware version.

SW Version: DRIVE-V5.1.6-E3550-EB-Aurix-With3LSS-ForHyperion-StepA-3.05.04

I will checkout the document you’ve mentioned here.

Thanks
Rishit

1 Like

Please also check if this topic helps on your problem. Thanks!

Hi @rborad,

May I know if this issue is fixed on your side?

Hi @VickNV,

We are getting DriveAGX soon, I will try your suggestions once we have the box. Thanks for following up. I will update the status here.

Thanks for helping out.

Regards,
Rishit

1 Like

@VickNV,

I was able to get mttcan can1 (can1) through my Host PC. I am able to send and receive messages to/from the Host to can1. I know that both Host PC and can1 are configured correctly. I moved both the devices to network where I can connect more CAN devices. (just simple daisy chained 4 DB9 connectors, image attached)

Next I connect my silent IMU to the CAN network. It runs into the problem when I send message to my IMU device to start sending message at 200Hz. (more details below) Here is the dmesg log:
errorlog.txt (71.2 KB)

At the startup, I am able to send a CAN message to my IMU though cansend can1 18FF5500#8001 command and enable the IMU to send periodic messages. The IMU receives this command and starts sending data packets at 200Hz rate on the CAN bus. But because mttcan can1 detects stuff errors and format errors, mttcan can1 enters error passive state and the bus shows some packets are received from the IMU around every four seconds. During all this, Host PC and mttcan can1 is able to send and receive messages broadcasted on the bus. As soon as mttcan can1 is removed from the bus and just IMU and Host PC are connected, HostPC starts receiving messages at 200Hz from the IMU.

I am assuming external CAN Transceiver is not required connecting to the can1 interface (Mechanical Guid says CAN_H & CAN_L not CAN_tx & CAN_rx). Our IMU has 5V transceiver, how do I know the transceiver specification for the DriveAGX CAN, can you please point me out to the HW spec?

EDIT: In above experiment the IMU has 5V transceiver, when IMU with 3.3V transceiver is connected, the IMU goes to error mode and stops sending packets after 8-10 packets sent. Our Goal is to make both IMUs work, is it possible?

EDIT2: IMU with 3.3V sends address claim packet every one second. CAN1 receives each packet all right. With this setup, I send can message through CAN1 and i don’t see anything on the bus, after 10 TX tries I get

write: no buffer space available

(qlen is 10). How ever CAN1 still receives address claim packets from IMU every second and receives random messages i send from Linux Hosts. Basically CAN1 TX is stopped. ErrorLog: TXErrorRXGoodStats.txt (893 Bytes) TXErrorRXGoooddmesg.txt (83.0 KB)

Then I configured IMU3.3V to send out data packet at minimum rate possible to check if CAN1 receives those but then both TX and RX gets stuck.
TXErrorRXErrordmesg.txt (83.0 KB) TXErrorRXErrorStats.txt (893 Bytes)

Hope this helps.

Regards,
Rishit

Thanks for pointing out to this thread. I think here the problem was pin connections on DB9 (1&7 instead of 2&8). I have created a network with CAN1&2 connected through pin 1&7 and CAN6&4 is connected through DB9 pins 2&8. And I am able to send commands from can0(CAN1&2) to can1(CAN6&4) and vice-versa.

Update,
The IMU i am trying to connect uses 3.3V transceiver internally to convert CAN_tx_rx to CAN_H&_L. I tried another IMU with 5V transceiver and and I see that CAN1 receives some message at variable rate. Looks like there are so many errors. CANErrorStat.txt (902 Bytes)

It would be really helpful if you could direct me to transceiver spec on the DriveAGX.

Thanks in advance.
Regards,
Rishit

We are checking with the internal team and will get back to you here.

BTW, you may not notice that we created below poll. Please help to vote there. Thanks!
https://forums.developer.nvidia.com/t/what-about-your-experience-in-using-the-bundled-sekonix-ar0231-gmsl/158695/3

1 Like

In terms of the voltage level, on the DRIVE AGX cable harness, it should be 5V for the CAN interfaces. Please note that you need to have 120 ohm termination on both ends. On DRIVE AGX side, we only lightly terminate the bus. The 5V transceiver you are using might not have the 120 ohm termination. You can refer to “Figure C-4. Example of E3556 System Connections” in DRIVE AGX Developer Kit Product Brief (PDF) as an example of RTC module that connects to CAN 6&4.

Thanks for the reply @VickNV. If you look at the picture I shared above, there are two 120ohms connected, one with CAN1 and another one with the HostPC. I also moved that 120ohms resistor from Host PC to IMU connector and its all same. I am sharing another picture with that setup plus a voltmeter showing impedance on the bus, which is around 60ohm. This tells me that termination is alright.

Thanks for sharing the document link, I tried running RTC through the CAN0 successfully. CAN messages from RTC uses 11-bit addressing. So i tried one of our IMUs with 11-bit addressing and it worked like a charm. But that is an old generation IMU that we do not support any more. I need to get IMU with 29bit addressing working. I will start looking for how to do that with drive platform/socketCAN, but i’d certainly appreciate it if you share anything related if you have it handy. I haven’t noticed anything that talks about configuring address length on the CAN bus but will keep looking and I will post here if I find something.

Thanks in advance. I appreciate your help so far.

Please see if “Programming Extended Message ID Filters” in the doc is what you need.

If it’s a different issue to this topic, please help to create a new topic. It will be easier for other developers encoutering the same problem to leverage your experience. Thanks!

Thanks for pointing out to the documentation, I updated the Global Filter Configuration but it still doesn’t work. I will try Extended ID Filter Configuration and few other things (eg. Bit-timing) to gather more information and if that doesn’t work i will open a new thread. I also don’t see any other threads on this forum working with 29-bit addressing on CAN bus.

I appreciate all your help so far.