TLDR: candump can0 gets stuck despite ifconfig showing can0 is connected. Same thing shows realtime can0 data if I use a laptop with same OS (Ubuntu 22.04) when using PCAN USB.

I followed the instructions for debugging and I am able to get the same exact results when I do a loopback. However, I am still not able to receive real-time data if not using loopback.

tutorial: Controller Area Network (CAN) — Jetson Linux Developer Guide documentation.

Related problem: Jetson orin nx :can “candump can0” Messages cannot be received, but “cansend” can be sent - #5 by 1428943841

Steps to reproduce the problem:

mona@ubuntu:~$ sudo ip link set can0 down
mona@ubuntu:~$ sudo ip link set can0 type can bitrate 500000
mona@ubuntu:~$ sudo ip link set can0 up
mona@ubuntu:~$ candump can0
^Cmona@ubuntu:~$

sys info:

mona@ubuntu:~$ cat /etc/nv_tegra_release
# R36 (release), REVISION: 3.0, GCID: 36923193, BOARD: generic, EABI: aarch64, DATE: Fri Jul 19 23:24:25 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia
mona@ubuntu:~$ uname -a
Linux ubuntu 5.15.136-tegra #1 SMP PREEMPT Mon May 6 09:56:39 PDT 2024 aarch64 aarch64 aarch64 GNU/Linux
mona@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy
mona@ubuntu:~$ ifconfig
can0: flags=193<UP,RUNNING,NOARP>  mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 3  bytes 12 (12.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3  bytes 12 (12.0 B)
        TX errors 0  dropped 3 overruns 0  carrier 3  collisions 0
        device interrupt 212

Debugging the CAN:

mona@ubuntu:~$ sudo ip link set can0 down
mona@ubuntu:~$ sudo ip link set can0 type can bitrate 500000 loopback on
mona@ubuntu:~$ sudo ip link set can0 up
mona@ubuntu:~$ candump can0 &
[1] 10426
mona@ubuntu:~$ cansend can0 123#abcdabcd
mona@ubuntu:~$   can0  123   [4]  AB CD AB CD
  can0  123   [4]  AB CD AB CD
^C

Hi mona.jalal,

What do you mean about “Candump can0 gets stuck”?

Could you share the block diagram of your connection for CAN communication?

What are you using for can1? Do you connect PCAN-USB on AGX Orin for can1?

1 Like

@KevinFFF

As for stuck, when I use candump can0 on the laptop I see real-time data from our can simulator HW that is connected via PCAN-USB to laptop but for the NVIDIA Jetson AGX ORIN 64G devkit, same command doesn’t show anything and the cursor keeps blinking.

For the other questions, how can I provide that information for you?

Is this the block diagram you asked for?

MicrosoftTeams-image (77)

What is “Simulator” in your block diagram?

Is that a device/module to generate CAN data?

For AGX Orin, can0 is the internal mttcan by default.
If you connect PCAN-USB adapter on AGX Orin devkit, it may be can1 so that please run candump can1 on AGX Orin devkit.

Please also share the full dmesg for further check.

1 Like

It is an internal simulator (a hardware device). We cannot share more information about it.

I have also tried “candump can1” and the same exact thing happens. It gets stuck meaning the cursor keeps blinking.

mona@ubuntu:~$ sudo ip link set can1 down
mona@ubuntu:~$ sudo ip link set can1 type can bitrate 500000
mona@ubuntu:~$ sudo ip link set can1 up
mona@ubuntu:~$ candump can1
 

^^ entering the last command in Jetson AGX Orin gets stuck with a blinking cursor. If I use the dmesg after it being stuck, I see this:

mona@ubuntu:~$ sudo dmesg | grep -i can
[sudo] password for mona: 
[   11.047496] drm drm: [drm] Cannot find any crtc or sizes
[   11.613840] CAN device driver interface
[   11.643441] TT CAN feature is not supported
[   11.665356] net can0: mttcan device registered (regs=00000000efbd2394, irq=212)
[   11.678048] TT CAN feature is not supported
[   11.712623] net can1: mttcan device registered (regs=00000000c3569254, irq=213)
[   13.522492] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[  516.357263] mttcan c310000.mttcan can0: Bitrate set
[  522.932154] mttcan c320000.mttcan can1: bit-timing not yet defined
[  522.932167] mttcan c320000.mttcan can1: failed to open can device
[  551.219318] mttcan c320000.mttcan can1: Bitrate set
[  559.148868] mttcan_controller_config: ctrlmode 0
[  559.148892] mttcan c320000.mttcan can1: Bitrate set
[  559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[  563.775024] can: controller area network core
[  563.775124] NET: Registered PF_CAN protocol family
[  563.781966] can: raw protocol
[  586.275336] mttcan c320000.mttcan can1: Bitrate set
[  590.091980] mttcan_controller_config: ctrlmode 0
[  590.092006] mttcan c320000.mttcan can1: Bitrate set

MicrosoftTeams-image (79)

Here is what I see in Jetson:

mona@ubuntu:~$ ifconfig
can1: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 213  

Using the same pcan-usb in my ubuntu 22.04 laptop, I see this for can0:

can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 140547  bytes 1124376 (1.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and after

  529  sudo ip link set can0 down
  530  sudo ip link set can0 type can bitrate 500000
  531  sudo ip link set can0 up
  532  candump can0

I see live data that looks like

@KevinFFF Could you suggest how to fix this problem and get the data on Jetson AGX Orin?

Some more info:

mona@ubuntu:~$ sudo modprobe can
mona@ubuntu:~$ sudo modprobe can_raw
mona@ubuntu:~$ sudo modprobe mttcan
mona@ubuntu:~$ lsmod | grep can
can_raw                28672  1
can                    28672  1 can_raw
mttcan                 65536  0
nvpps                  28672  2 mttcan,nvethernet
can_dev                36864  1 mttcan

mona@ubuntu:~$ sudo journalctl -xe | grep -i can1
Sep 24 10:25:32 ubuntu sudo[4841]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 down
Sep 24 10:25:51 ubuntu sudo[4999]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:25:51 ubuntu kernel: mttcan c320000.mttcan can1: bit-timing not yet defined
Sep 24 10:25:51 ubuntu kernel: mttcan c320000.mttcan can1: failed to open can device
Sep 24 10:26:19 ubuntu sudo[5283]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 type can bitrate 500000
Sep 24 10:26:19 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:27 ubuntu sudo[5286]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:26:27 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:27 ubuntu kernel: IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
Sep 24 10:26:50 ubuntu sudo[5302]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 down
Sep 24 10:26:54 ubuntu sudo[5305]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 type can bitrate 500000
Sep 24 10:26:54 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
Sep 24 10:26:58 ubuntu sudo[5310]:     mona : TTY=pts/0 ; PWD=/home/mona ; USER=root ; COMMAND=/usr/sbin/ip link set can1 up
Sep 24 10:26:58 ubuntu kernel: mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ sudo dmesg | tail
[  551.219318] mttcan c320000.mttcan can1: Bitrate set
[  559.148868] mttcan_controller_config: ctrlmode 0
[  559.148892] mttcan c320000.mttcan can1: Bitrate set
[  559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[  563.775024] can: controller area network core
[  563.775124] NET: Registered PF_CAN protocol family
[  563.781966] can: raw protocol
[  586.275336] mttcan c320000.mttcan can1: Bitrate set
[  590.091980] mttcan_controller_config: ctrlmode 0
[  590.092006] mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ sudo dmesg | grep -i can 
[   11.047496] drm drm: [drm] Cannot find any crtc or sizes
[   11.613840] CAN device driver interface
[   11.643441] TT CAN feature is not supported
[   11.665356] net can0: mttcan device registered (regs=00000000efbd2394, irq=212)
[   11.678048] TT CAN feature is not supported
[   11.712623] net can1: mttcan device registered (regs=00000000c3569254, irq=213)
[   13.522492] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[  516.357263] mttcan c310000.mttcan can0: Bitrate set
[  522.932154] mttcan c320000.mttcan can1: bit-timing not yet defined
[  522.932167] mttcan c320000.mttcan can1: failed to open can device
[  551.219318] mttcan c320000.mttcan can1: Bitrate set
[  559.148868] mttcan_controller_config: ctrlmode 0
[  559.148892] mttcan c320000.mttcan can1: Bitrate set
[  559.148984] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
[  563.775024] can: controller area network core
[  563.775124] NET: Registered PF_CAN protocol family
[  563.781966] can: raw protocol
[  586.275336] mttcan c320000.mttcan can1: Bitrate set
[  590.091980] mttcan_controller_config: ctrlmode 0
[  590.092006] mttcan c320000.mttcan can1: Bitrate set
mona@ubuntu:~$ lsusb
Bus 002 Device 003: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 008: ID 0c72:000c PEAK System PCAN-USB
Bus 001 Device 007: ID 0bfd:0120 Kvaser AB Kvaser Leaf Light v2
Bus 001 Device 006: ID 1248:1061 Vector Informatik GmbH Vector VN1630A
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 002: ID 13d3:3549 IMC Networks Bluetooth Radio
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mona@ubuntu:~$ ip -details -statistics link show can1
3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 500000 sample-point 0.870 
	  tq 20 prop-seg 43 phase-seg1 43 phase-seg2 13 sjw 1
	  mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
	  mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
	  clock 50000000 
	  re-started bus-errors arbit-lost error-warn error-pass bus-off
	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c320000.mttcan 
    RX:  bytes packets errors dropped  missed   mcast           
             0       0      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
             0       0      0       0       0       0 

mona@ubuntu:~$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can 
3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can 

extra info:

Based on the following info, it looks the connection is working however, live data receiving is not


mona@ubuntu:~$ sudo ip link set can1 down

mona@ubuntu:~$ can-calc-bit-timing -b 500000

Bit timing parameters for sja1000 with 8.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    125   6    7    2   1   1  500000  0.0% 87.5% 87.5%  0.0% 0x00 0x1c
 
Bit timing parameters for mscan with 32.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    125   6    7    2   1   4  500000  0.0% 87.5% 87.5%  0.0% 0x03 0x1c
 
Bit timing parameters for mscan with 33.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    181   4    4    2   1   6  500000  0.0% 87.5% 81.8%  6.5% 0x05 0x17
 
Bit timing parameters for mscan with 33.300000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    180   4    4    2   1   6  504545  0.9% 87.5% 81.8%  6.5% 0x05 0x17
 
Bit timing parameters for mscan with 33.333333 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    180   4    4    2   1   6  505050  1.0% 87.5% 81.8%  6.5% 0x05 0x17
 
Bit timing parameters for mscan (mpc5121) with 66.660000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    105   7    8    3   1   7  501203  0.2% 87.5% 84.2%  3.8% 0x06 0x2e
 
Bit timing parameters for mscan (mpc5121) with 66.666666 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error BTR0 BTR1

500000    105   7    8    3   1   7  501253  0.3% 87.5% 84.2%  3.8% 0x06 0x2e
 
Bit timing parameters for at91 (ronetix PM9263) with 99.532800 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error     CAN_BR

500000    100   8    8    3   1  10  497664  0.5% 87.5% 85.0%  2.9% 0x00090772
 
Bit timing parameters for at91 with 100.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error     CAN_BR

500000    100   8    8    3   1  10  500000  0.0% 87.5% 85.0%  2.9% 0x00090772
 
Bit timing parameters for flexcan (mx28) with 24.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    125   6    7    2   1   3  500000  0.0% 87.5% 87.5%  0.0% 0x02310005
 
Bit timing parameters for flexcan (mx6) with 30.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    133   6    6    2   1   4  500000  0.0% 87.5% 86.6%  1.0% 0x03290005
 
Bit timing parameters for flexcan with 49.875000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    100   8    8    3   1   5  498750  0.2% 87.5% 85.0%  2.9% 0x043a0007
 
Bit timing parameters for flexcan with 66.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    166   4    5    2   1  11  500000  0.0% 87.5% 83.3%  4.8% 0x0a210003
 
Bit timing parameters for flexcan with 66.500000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    105   7    8    3   1   7  500000  0.0% 87.5% 84.2%  3.8% 0x063a0006
 
Bit timing parameters for flexcan with 66.666666 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    105   7    8    3   1   7  501253  0.3% 87.5% 84.2%  3.8% 0x063a0006
 
Bit timing parameters for flexcan (vybrid) with 83.368421 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error   CAN_CTRL

500000    143   5    6    2   1  12  496240  0.8% 87.5% 85.7%  2.1% 0x0b290004
 
Bit timing parameters for mcp251x with 8.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error CNF1 CNF2 CNF3

500000    125   6    7    2   1   1  500000  0.0% 87.5% 87.5%  0.0% 0x00 0xb5 0x01
 
Bit timing parameters for mcp251x with 16.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error CNF1 CNF2 CNF3

500000    125   6    7    2   1   2  500000  0.0% 87.5% 87.5%  0.0% 0x01 0xb5 0x01
 
Bit timing parameters for ti_hecc with 13.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error     CANBTC

500000    153   5    5    2   1   2  500000  0.0% 87.5% 84.6%  3.3% 0x00010049
 
Bit timing parameters for rcar_can with 65.000000 MHz ref clock

nominal                                 real Bitrt   nom  real SampP

Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error      CiBCR

500000    153   5    5    2   1  10  500000  0.0% 87.5% 84.6%  3.3% 0x90090100
 
mona@ubuntu:~$ sudo ip link set can1 type can bitrate 500000 restart-ms 100

mona@ubuntu:~$ sudo ip link set can1 up

mona@ubuntu:~$ ip -details -statistics link show can1

3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10

    link/can  promiscuity 0 minmtu 0 maxmtu 0 

    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 100 

	  bitrate 500000 sample-point 0.870 

	  tq 20 prop-seg 43 phase-seg1 43 phase-seg2 13 sjw 1

	  mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1

	  mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1

	  clock 50000000 

	  re-started bus-errors arbit-lost error-warn error-pass bus-off

	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c320000.mttcan 

    RX:  bytes packets errors dropped  missed   mcast           

             0       0      0       0       0       0 

    TX:  bytes packets errors dropped carrier collsns           

             0       0      0       1       0       0 

I am still not sure what’s the cause for this problem?? or how to troubleshoot further?

I don’t have your setup and the modules to verify them locally so that I can not give the exact steps to fix the issue.

There seem 2 internal mttcan available on AGX Orin (can0 and can1).
Please also try if can2 is used for your PCAN-USB.

And also share the full dmesg for us to check the exact CAN interface for your PCAN-USB.

As my understanding, you have to confirm the bitrate is the same for both TX/RX sides.
(TX: Simulator, RX: PCAN-USB adapter)
In your case, Jetson AGX Orin is just acting as USB host and your PCAN-USB adapter is a USB device.

1 Like

Hi Kevin, you are correct that for this Jetson can2 was the one for pcan-usb

Our problem was not using the third command below. After using it, we were able to retrieve data from can2.

cd peak-linux-driver-8.18.0
make clean
make NET=NETDEV_SUPPORT
sudo make install

Could you please confirm that for ORIN NX 16G devkit, you only have one can? Since I am having the can0 from Jetson and can1 is showing live data from my emulator. Thanks for any guidance.

Is there any reason that ORIN NX 16g only has can0 and AGX ORIN 64G has can0 and can1? I am asking to educate myself.

[1:09 PM] Mona Jalal
mona@mona:~$ ip -s -d link show can0

5: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10

    link/can  promiscuity 0 minmtu 0 maxmtu 0 

    can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0 

	  mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1

	  mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1

	  clock 50000000 

	  re-started bus-errors arbit-lost error-warn error-pass bus-off

	  0          0          0          0          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c310000.mttcan 

    RX:  bytes packets errors dropped  missed   mcast           

             0       0      0       0       0       0 

    TX:  bytes packets errors dropped carrier collsns           

             0       0      0       0       0       0 

mona@mona:~$ ip -s -d link show can1 

49: can1: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10

    link/can  promiscuity 0 minmtu 0 maxmtu 0 

    can state ERROR-WARNING (berr-counter tx 0 rx 124) restart-ms 0 

	  bitrate 500000 sample-point 0.875 

	  tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1

	  pcan: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1

	  clock 8000000 

	  re-started bus-errors arbit-lost error-warn error-pass bus-off

	  0          149868     0          30         29         0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 

    RX:  bytes packets errors dropped  missed   mcast           

        510688   63836 149868       0       0       0 

    TX:  bytes packets errors dropped carrier collsns           

             0       0      0       0       0       0 

^^^ I think from the command above we can confirm that can1 in ORIN NX 16g devkit is can1.

Also, is it ok that state of CAN1 is ERROR-WARNING?

I read somewhere it is required to be ERROR-ACTIVE. However, I am able to get live data from our CAN emulator.

Correct! AGX Orin has 2 internal CAN and Orin NX has 1 internal CAN.
You can also check the dmesg for the CAN number. It might also relate to the order of driver probing.

AGX Orin and Orin NX are both from Orin series(T234) with different capability.
Apparently, AGX Orin is more powerful than Orin NX so that it has more interfaces/ports by default.

It should be fine for both ERROR-ACTIVE and ERROR-WARNING state.

1 Like

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