Cannot accurately set CAN BUS communication bit rate on Jetson AGX Xavier with BSP 32.7.2 and failed to communicate with external device

I cannot precisely set the CAN communication bit rate to 250000, 500000, 1000000. For example, when I try to set the bit rate to 250000, the actual set value is showing as 249350. I tried to use PLLAON as clock source according to the development guide, but still, it is failing.

The PLLAON Clock ID(0x5e) is already in the list in BPMPFW dtb file.

	clock@can1 {
		allow_fractional_divider = <0x01>;
		allowed-parents = <0x121 0x5b 0x5e 0x13a>;
		clk-id = <0x09>;

	clock@can2 {
		allow_fractional_divider = <0x01>;
		allowed-parents = <0x121 0x5b 0x5e 0x13a>;
		clk-id = <0x0b>;

Below is the dmesg log, can configuration log and dts file.
dmesg_log.txt (114.3 KB)
can_configuration_log.txt (1.5 KB)
kernel_tegra194-p2888-0008-p2822-0000.dtsi.txt (371.1 KB)

Please let me know if I am missing anything here.

Hi vbhm,

Are you using the devkit or custom board for AGX Xavier?

Could you also verify with the latest R32.7.4 or R35.5.0?

[   85.580480] mttcan c310000.mttcan can0: bitrate error 0.2%
[   85.580652] mttcan c310000.mttcan can0: Bitrate set

It seems there’s bitrate error 0.2% in your dmesg so that it doesn’t match the exact 250000.

Please also check if the following topic could help for your case.
AGX Xavier set can0 baudrate kernel Prompt error - #3 by KevinFFF

I was able to get this working on my devkit by following this guide: Clocks — Jetson Linux Developer Guide documentation

You have to edit two DTB files:

  • tegra194-a02-bpmp-p2888-a04.dtb which is in the SDK manager files. You can avoid a full re-flash by passing -k bpmp-fw-dtb to ./
  • tegra194-p2888-0001-p2822-0000.dtb which was somewhere in /boot on my system. It is the one pointed to in /boot/extlinux/extlinux.conf

I just used locate to find these DTB files and dtc to convert them to DTS and vice versa.

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