Hi,All.
we use NVIDIA AGX Orin,and add mttcan module, we test CAN by the following steps:
connect CAN transceiver
set CAN bitrate
sudo ip link set can0 type can bitrate 500000
sudo ip link set can1 type can bitrate 500000
sudo ifconfig can0 up
sudo ifconfig can1 up
Test receive & transmit
Receive.
candump can0, CAN0 can receive data from CAN OE.
candump can1. CAN1 can receive data from CAN OE.
Transmit.
cangen can0 -v -g 200. CAN-OE can`t receive data from Orin.
cangen can1 -v -g 200. CAN -OE can`t receive data from Orin.
Then we try to print kernel information.
dmesg | grep can1.
[result]
mttcan c320000.mttcan can1: entered error warning state
mttcan c320000.mttcan can1: entered error passive state
mttcan c320000.mttcan can1: entered bus off state
ip -details -statistics link show can1
[result]
9: can1: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can state BUS-OFF (berr-counter tx 248 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 1 1 1 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
24 3 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
what`s wrong with the Orin CAN? Any help would be appreciated
Following are steps to modify CAN pinmux:
1. Download <Jetson AGX Orin Series Pinmux> from Jetson Download Center.
2. Modify then downloaded spreadsheet and generate {Orin-jetson_agx_orin-gpio-defalut.dtsi, Orin-jetson_agx_orin_padvoltage-default.dtsi, Orin-jetson_agx_orin-pinmux.dtsi}. Please refer to "can-spreadsheet.png".
3. Merge related changes to {bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi, bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi}. Please refer to {pinmux-change.png, gpio-change.png}.
4. Re-flash MB1_BCT to apply changes.
Hi alanz. CAN Bus is still not working!
The steps are as follows:
Modify Orin_Jetson_Series_Pinmux_Config_Template.xlsm and generate .dtsi file.
Modify file <bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi> about CAN Infomation. The main fields to be modified are ”nvidia,function = can x“。
use sdkmanager to flash。
I think the appeal steps are consistent with the following operations。
sudo busybox devmem 0x0c303010 32 0x0000C400
sudo busybox devmem 0x0c303018 32 0x0000C458
hello, kayccc. I think my actions are consistent with the L4T doc.
[Kernel DTB]
$ cat /proc/device-tree/mttcan@c310000/status
output: okay
$ cat /proc/device-tree/mttcan@c320000/status
output: okay
[Pinmux]
sudo busybox devmem 0x0c303000 w 0x400
sudo busybox devmem 0x0c303008 w 0x458
sudo busybox devmem 0x0c303010 w 0x400
sudo busybox devmem 0x0c303018 w 0x458
We have two orin developer kits. and three SN65HVD230 CAN transceivers。Multiple tests were done with each of them,the final result is the same as before.
If your test is OK,can you tell me your specific process and transceiver model number?
thanks!