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
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
If two ORIN CANFDs are connected together, they can also communicate with each other in the case of 2M and 5M.
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
MCU (THA6) and CANFD tools can communicate normally at any baud rate.
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?
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。