AGX ORIN CANFD测试报错

测试过程:

#can参数配置
ip link set can0 up type can bitrate 1000000 dbitrate 5000000 berr-reporting on fd on
ip link set can1 up type can bitrate 1000000 dbitrate 5000000 berr-reporting on fd on

candump -x any &

cansend can1 123##1abcdabcd

发送完以上命令后,内核打印了错误:

[ 761.331931] mttcan c320000.mttcan can1: Bit0 Error Detected
[ 761.332183] mttcan c320000.mttcan can1: IR 0x10010000 PSR 0x51f
[ 761.332395] mttcan c320000.mttcan can1: entered error warning state
[ 761.332604] mttcan c320000.mttcan can1: Bit0 Error Detected
[ 761.332795] mttcan c320000.mttcan can1: IR 0x11000000 PSR 0x55f
[ 761.333339] mttcan c320000.mttcan can1: entered error passive state
[ 761.333544] mttcan c320000.mttcan can1: Bit0 Error Detected
[ 761.333729] mttcan c320000.mttcan can1: IR 0x10800000 PSR 0x57f
[ 761.333937] mttcan c320000.mttcan can1: Bit0 Error Detected
[ 761.334115] mttcan c320000.mttcan can1: IR 0x10000000 PSR 0x57f
[ 761.334330] mttcan c320000.mttcan can1: entered bus off state
[ 761.334496] mttcan c320000.mttcan can1: Bit0 Error Detected
[ 761.334662] mttcan c320000.mttcan can1: IR 0x12000000 PSR 0x5e7

同时,抓取信号看起来也不正常:

同时,我也看到了这篇:英伟达团队您好,canfd支持加速发送吗?使用canf加速发送,总线就会出现bus-off;发送canfd,总线正常 - #10 by KevinFFF

他的情况似乎与我相同,但平台不同,请问能否提供AGX ORIN平台的patch?

如果我不使用CANFD,则一切正常

ip link set can0 up type can bitrate 1000000 dbitrate 5000000 berr-reporting on fd on
ip link set can1 up type can bitrate 1000000 dbitrate 5000000 berr-reporting on fd on
cansend can1 123#abcdabcd

Hi dcb0223,

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

Do you connect CAN0 and CAN0 with 2 CAN transceivers in your setup to verify?
If so, what’s the CAN transceiver in use?

1.we use our custom borad for agx orin

2.we use jetpack 5.1.4

3.We connect CAN0 and CAN1, but we cannot send the candfd data; we can only send CAN data.

4.we use this candf transceiver test agx orin’s can interface

Could you run the following commands before setup CAN to check if it helps for your case?

# 0x600 > /sys/devices/platform/c310000.mttcan/net/can0/tdc_offset
# 0x600 > /sys/devices/platform/c320000.mttcan/net/can1/tdc_offset

I have checked the official website and forum, and have tested this command. The result is the same after inputting it.

The situation described in this article is similar to mine. You provided the corresponding platform patch package to solve the problem. Could you also provide a patch package for AGX orin?

That patch is for AGX Thor with JP7.x (r38.x) which is different from yours (AGX Orin with JP5.x(r35.x)).
I think the prod-setting for CAN has been configured in your case.
Could you provide the full device tree for double confirm?

Could you also verify with the latest JP5.1.5 or JP6.2.1?