We have developed custom carrier board with AGX Xavier.One of our use case of the carrier board is to use the CAN bus at 4Mbps with BRS bit enabled.
To test the CAN Bus we connected the two carrier board and used the below command for transfer
In AGX_2,
$ sudo ip link set can0 up type can bitrate 1000000 dbitrate 4000000 fd on berr-reporting on restart-ms 100
$ candump -x -ta can0,0:0,#FFFFFFFF
In AGX_1,
$ sudo ip link set can0 up type can bitrate 1000000 dbitrate 4000000 fd on berr-reporting on restart-ms 100
As mentioned in the official document, all types of transceivers can achieve a 5 Mbps data bit rate.
But we are getting ERRORFRAME at 4Mbits with BRS bit enabled. In our case we are using TJA1462AT/0Z transreceiver from NXP which at max can supports 8Mbps. Please refer the attached schematics.
could you please check clock sources, if clk_m as source in the CAN controller driver, BRS (bit rate switching) mode is not supported.
please refer to developer guide CAN (Controller Area Network) to modify CAN parent clock for testing.
thanks
hello JerryChang,
Already,
clk_m is changed to PLLAON.
CAN core clock is set to 40Mhz as per the requirement.
We are able to communicate upto 3Mbps datarate with BRS bit enabled. However, there is a problem when communication while 4Mbps with BRS bit enabled.
Do we have any update on this?
Reply from transreceiver vendor!
“Does your CAN module allow to enable Transceiver Delay Compensation mechanism (TDC)?
TDC is needed for higher rates when transceiver loop delay becomes bigger then CAN bit time so CAN module is not able to detect properly transmitted bits. So in order to compensate for this loop delay when checking for bit errors, a SecondarySample-Point (SSP) is defined and instead at the Sample-Point, the transmitted bits are checked at the SSP.”
Probed differential signal of CAN bus 4Mbps data rate, fd on and BRS enbaled. There is some voltage level mismatch in the end of frame.
I tried with default CAN core clock(38.4Mhz). The datarate is one-third of the actual datarate set using the below command,
$ sudo ip link set can0 up type can bitrate 1000000 dbitrate 4000000 fd on berr-reporting on restart-ms 100
We can set up to 5Mbps using the above command, but the data rate is one-third of the actual data rate.
For example,
If the data rate set is 1 Mbps the actual datarate as to be 1 Mbps but it 333kbps.
If the data rate set is 5 Mbps the actual datarate as to be 5 Mbps but it 333*5(1665) kbps.
We tried with all 1 to 5 Mbps.
We tried with Xavier NX, in that case all 1 to 5 Mbps works at the desired actual data rate. There is some CAN clock frequency related difference in Xavier AGX som(L4T32.6.1) and Xavier NX som(L4T32.4.3).
Can please help us in resolving CAN issue in Xavier AGX som
Xavier series are sharing the same kernel drivers.
since you repo’ed the issue on r32.6.1/AGX Xavier, is it a regression?
could you please also narrow down the issue.
for example,
is it possible to fall back to r32.4.3/AGX Xavier to confirm this?
or, you may upgrade Xavier NX to r32.6.1 to check this is related to AGX Xavier only.