CANFD cannot receive data at both 2M and 5M

I encountered some issues while trying to use CANFD on ORIN, version 35.4.1 of jetpack。

1.CANFD 500KHZ\1MHZ:
Normal sending and receiving
2.When CANFD is at 2MHz and 5MHZ, it can send data normally, but the data cannot be received properly, and the receiving will report the following error:
[ 5936.874475] mttcan c310000.mttcan can0: Stuff Error Detected
[ 5936.880335] mttcan c310000.mttcan can0: IR 0x8010000 PSR 0x2711
[ 5936.886494] mttcan c310000.mttcan can0: Stuff Error Detected
[ 5936.892322] mttcan c310000.mttcan can0: IR 0x18000000 PSR 0x209
[ 5956.336244] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 5956.342975] mttcan c310000.mttcan can0: IR 0x10010000 PSR 0x13031f
[ 5956.349434] mttcan c310000.mttcan can0: entered error warning state
[ 5956.355888] mttcan c310000.mttcan can0: entered error passive state
[ 5956.362347] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 5956.369070] mttcan c310000.mttcan can0: IR 0x11800000 PSR 0x13037f
[ 5956.375507] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 5956.382238] mttcan c310000.mttcan can0: IR 0x10000000 PSR 0x13037f
[ 5956.388641] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 5956.395356] mttcan c310000.mttcan can0: IR 0x10000000 PSR 0x13037f
[ 5956.401766] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 5956.408477] mttcan c310000.mttcan can0: IR 0x10000000 PSR 0x13036f

I tried to modify dbitrate sample, and sometimes when receiving data, the error message is as follows:
[ 3085.090647] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.096608] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.102550] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.108492] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.114450] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.120415] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.126363] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.132319] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.138244] mttcan c310000.mttcan can0: Format Error Detected
[ 3085.144193] mttcan c310000.mttcan can0: Format Error Detected

tdc_offset配置如下:
xingshen001@ugv:/sys/devices/platform/c320000.mttcan/net/can1$ echo 0x600 tdc_offset
0x600 tdc_offset
xingshen001@ugv:/sys/devices/platform/c320000.mttcan/net/can1$ echo 0x600 > tdc_offset

  1. I didn’t see the setting for tdc_filterw_window in the kernel, is it not necessary to set it? tried to make the following modifications to the ttcan_det_bitrate function in the kernel, but still got the same error

4.The CANFD counterpart uses standard CANFD tools
Please provide your valuable suggestions, thanks.

Hi 837535053,

Are you using the devkit or custom board for AGX Orin?

Could you share the block diagram of your connections?
Do you connect the CAN transceiver for can0? What’s your another can device?

Have you confirmed the similar configuration (bitrate) for both sides?
Please also share the detailed steps to reproduce the issue.

I am using boards from our own company.The board end circuit diagram is as follows:

CANFD tool is a product of Zhuhai Chuangxin Technology. The link is as follows: https://www.zhcxgd.com/en/h-pd-12.html

The two situations I tested are as follows:

  1. If two ORIN CANFDs are connected together, they can also communicate with each other in the case of 2M and 5M.
  2. In addition to the CANFD tool, I also used MCU (THA6) and ORIN for communication. In this case, 2M can send and receive normally, while 5M cannot receive normally
  3. MCU (THA6) and CANFD tools can communicate normally at any baud rate.

thanks

Do you mean 5M can work if you connect both CANFD_6_H to CANFD_7_H and CANFD_6_L to CANFD_7_L?

If above answer is yes, I would suggest you checking the CAN configuration from MCU side since 5M can work between can0 and can1.

Yes, CANFD-6 can communicate with CANFD_7 at 5M. But MCU (THA6) and CANFD tools can communicate normally at any baud rate. I think there should be no problem with the MCU. The reason why the two CANFDs between ORINs can communicate normally is because the internal settings are the same. Is it possible that the sampling points set by ORIN do not match the actual adoption points?

The CAN configuration could be read from sudo ip -d -s link show can0 command.

Have you confirmed that you have the similar CAN configuration for CANFD-6 and MCU(THA6)?

I obtained the configuration of CAN through the sudo ip -d -s link show can0 command. The reading is the same as what I configured. If the sampling point is not configured to be the same as the MCU, 2M data will not be received from the MCU.
When set to the same sampling point as MCU at 5M, it cannot receive data normally。
When set to the same sampling point as CANTOOL for 2M and 5M, data cannot be received normally。

I want to know how tdc_filter_window is set. thanks

Could you reproduce the similar issue on the devkit?

Normally, we would only configure tdc_offset which is adjustable based on HW calibration.

Except for the value of sampling point, have you also checked other configurations? (e.g. bitrate, clock frequency)
Please also try adding sjw 4 to check if it could help for your case.

The outputs from the development board are can_tx and can_rx, which require an external adapter board to be converted into can_h and can_l. I am currently purchasing the adapter board and waiting for testing。

Yes, you need CAN transceiver in the setup to transform CAN TX/RX to CAN-H/CAN-L for CAN tracnsaction.

From the previous schematic your shared, it looks like TJA1042, please confirm it can work with both 2M and 5M for CAN-FD.

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