Hello,
Setup:
I am using a Jetson AGX Orin Developer Kit Carrier board tegra234-p3737-0000+p3701-0000
.
I bought two CAN FD transceivers and connected both jetson CANs (can4
and can5
in my case) between them.
I set the clock to be 80MHz (recompiling the driver) and these config:
$ sudo ip link set can4 up type can bitrate 1000000 sample-point 0.6 dbitrate 5000000 dsample-point 0.625 fd on loopback off
$ ip -details link show can4
20: can4: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can <FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 1000000 sample-point 0.600
tq 12 prop-seg 23 phase-seg1 24 phase-seg2 32 sjw 1
mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
dbitrate 5000000 dsample-point 0.625
dtq 12 dprop-seg 4 dphase-seg1 5 dphase-seg2 6 dsjw 1
mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
clock 80000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev c310000.mttcan
Same for can5
.
Problem:
When I try to send a FD frame,
$ cansend can4 123##1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
it is truncated in the Control Field, in the BRS more or less (sniffing with a logic analyzer):
However, in loopback mode on
$ sudo ip link set can4 up type can bitrate 1000000 sample-point 0.6 dbitrate 5000000 dsample-point 0.625 fd on loopback on
the frame is fully and correctly generated:
and if I do not set can5
to loopback mode, it sends ACK! So it is not a matter of my hardware nor the capabilities of the CAN, not even CAN misconfiguration. It seems it is a matter of the Jetson CAN Controller.
Notes:
I have tried other configurations and other clocks. Some of them work and some others don’t. I need that configuration (sample-point 0.6
and dsample-point 0.625
) working.
- Clock 200MHz,
sample-point 0.75
anddsample-point 0.75
works. - Clock 200MHz,
sample-point 0.6
anddsample-point 0.625
does NOT work. - Clock 80MHz,
sample-point 0.75
anddsample-point 0.75
does NOT work.
Can you recreate this problem? Are you able to communicate with my CAN parameters?
Thank you,
Ignasi