Dear Community,
We have developed a custom carrier for the Xavier NX and are now trying to bring up the CAN interface up. We got the interface up for 500kbps but the same is failing at 1Mbps. Has anyone tested the interface at 1Mbps?
We are keen to know if there are slew rate limitations imposed by the software driver that needs to be enabled in the back end. We are using the transceiver NXP# PCA82C251T/YM,118.
Hi roshan,
Can you please tell me the commands you are using to send/receive and for bitrate configurations?
Also, please paste the errors you are seeing.
Once we configure CAN for 1mbps baud, and try to send something, transmission doesn’t happen and the following appears in dmesg :
[ 149.670053] mttcan c310000.mttcan can0: Bitrate set
[ 228.119272] mttcan c310000.mttcan can0: bitrate error 1.0%
[ 228.119421] mttcan c310000.mttcan can0: Bitrate set
[ 233.654596] mttcan_controller_config: ctrlmode 0
[ 233.654624] mttcan c310000.mttcan can0: Bitrate set
[ 256.953469] mttcan c310000.mttcan can0: entered error warning state
[ 256.953800] mttcan c310000.mttcan can0: entered error passive state
[ 256.956108] mttcan c310000.mttcan can0: entered bus off state
Post this, we cant use bus any more. To recover, we need to remove the drivers and reinsert again.
We are configuring can using below commands :
sudo modprobe can sudo modprobe can_raw sudo modprobe mttcan sudo ip link set can0 type can bitrate 1000000 sudo ip link set up can0 candump can0
and cansend can1 5A1#1122334455667788
We have a CAN line from NX to one CAN port to Xavier AGX.
Attaching complete dmesg for your ref. desg.log (67.2 KB)
Hi,
The clock parent are different in both the systems.
Can you please tell me what BSP version is flashed in both the systems?
Also, did you make any change in kernel dtbs?
In Xavier AGX: pllaon clock is set and In NX: osc clock is set thus the bitrates differ and thus biterrors are coming.
You need to set pllaon clock in NX also for the problem to solve.
Please provide BSP versions details so that I wil check at my end why the clocks differ.
Hi Michael,
Please use R32.4 in AGX to set osc clock. Or if you want to only update dtb then update mttcan node in dts with following:
pll_source = “osc”;
clocks = <0x4 0x11c 0x4 0xa 0x4 0x9 0x4 0x5b>;
clock-names = “can_core”, “can_host”, “can”, “osc”;
I see that this clock change is now merged as part of R32.4.3, thanks. One thing I notice is that the CAN controller clock is at 38.4MHz, so when asking for 1Mbit/s bitrate, the achieved bitrate reported back by ip is 1010526 instead of 1000000. There is no way in hardware to clock the Xavier NX CAN controller at exactly 40MHz like on TX2?
hi,shgarg, The instructon of How to use PLLAON as clock source about following content:
“Convert the BPMPFW DTB (e.g. tegra194-a02-bpmp-p2888-a04.dtb) to a DTS using the dtc tool”
I don’t understand BPMPFW DTB is where and how to use device tree compiler tool
can you specify that,thanks