CAN interface with BRS bit enabled

Hi team,

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

$ ip -s -d link show can0
7: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0
can <BERR-REPORTING,FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1000000 sample-point 0.750
tq 25 prop-seg 14 phase-seg1 15 phase-seg2 10 sjw 1
mttcan: tseg1 2…255 tseg2 0…127 sjw 1…127 brp 1…511 brp-inc 1
dbitrate 4000000 dsample-point 0.700
dtq 25 dprop-seg 3 dphase-seg1 3 dphase-seg2 3 dsjw 1
mttcan: dtseg1 1…31 dtseg2 0…15 dsjw 1…15 dbrp 1…15 dbrp-inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

$ cangen can0 -g 400 -e -b -L i -x -v -v

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.

We are getting these errors in AGX_2,

(1665068435.919038) can0 RX - - 20000088 [8] 00 00 02 00 00 00 00 00 ERRORFRAME
(1665068435.919404) can0 RX - - 20000088 [8] 00 00 02 00 00 00 00 00 ERRORFRAME
(1665068435.919666) can0 RX - - 20000088 [8] 00 00 02 00 00 00 00 00 ERRORFRAME

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.

Please let us know the solution for this problem?

Best Regards,
Saideepak.

hello saideepak.r,

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.

As per the documentation link : Controller Area Network (CAN) — Jetson Linux<br/>Developer Guide 34.1 documentation
How to set TDCR (Transmission Delay Compensation Register) in L4T32.6.1 AGX Xavier?
This path “/sys/devices/c320000.mttcan/net/can1/tdcr” doesn’t exists in L4T32.6.1.

Can you help us on this?

hello saideepak.r,

I’ve file this issue to internal team for checking, will update this thread after we have conclusions.

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.

Can you check this and support us as soon as possible?

Hi team,

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

hello saideepak.r,

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.

Thanks for the update.
We have moved to another Trans receiver IC. Now we can use from 1 to 5 Mbps under 40Mhz CAN core clock frequency.

As per the documentation link : Controller Area Network (CAN) — Jetson Linux
Developer Guide 34.1 documentation

How to set TDCR (Transmission Delay Compensation Register) in L4T32.6.1 AGX Xavier?
This path “/sys/devices/c320000.mttcan/net/can1/tdcr” doesn’t exists in L4T32.6.1.

Can you help us on this as soon as possible?

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

We have enabled TDC mechanism and resolved the issue.
Thank you.

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