Enable optional CAN bus in Jetson Xavier NX

Hi,

I have been trying to configure CAN-BUS on the JETSON NX development board with a CAN transceiver SN65HVD230. I followed this nvidia forum thread and this medium article.

But I getting a error Cannot find device "can0" when I execute ip link set can0 up type can bitrate 500000 command.

I’m using Jetpack 4.4.

Any idea regarding Cannot find device "can0" error?

Thanks in advance

Hi,
Please increase kernel log level and share kernel dmesg logs.

Thanks,
Shubhi

Please find the attached dmesg logfile

dmesglog.txt (71.1 KB)

Did you change anything in SW related to clocks?

No

FYI, I configured the Jetpack using Jetson NX SD card image available from official Jetson Download Center.

Hi vijeshagnair,
This is the issue with J4.4 and will be fixed in our next release.
For now, you can solve it in 2 ways:

  1. Use osc clock as parent clock of can:
    Go to Linux_for_Tegra/kernel/dtb/
    in jetson-nx dtb, replace mttcan@c310000:
    replace clock properties under this node as below:
    pll_source = “osc”;
    clocks = <0x4 0x11c 0x4 0xa 0x4 0x9 0x4 0x5b>;
    clock-names = “can_core”, “can_host”, “can”, “osc”;

Compile the dtb and use this dtb to flash the device again.

  1. Use pllaon clock as parent clock, this will take efforts/time.
    Follow this:
    Here is the documentation available to change CAN parent clock to PLLAON.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fclocks.html%23wwpID0E06B0HA

Check “ To use PLLAON as clock source” section

With PLLAON, users will be able to achieve 50MHz CAN core clock rate and 1Mbps exact bitrate settings as well.

To set 40MHz clock rate, I just replied in this thread, please check it out.

How to change frequency of CAN interface Jetson Xavier NX

Let me know if you face any issues.

Thanks,
Shubhi

Hi Shubhi,

Has this issue been resolved in Jetpack 4.5?

Hello @shgarg , I have the same question that @captain_billgardo. Has this issue been resolved in Jetpack 4.5?

Hi,
Yes, it is resolved and you can use CAN on NX.

Thanks,
Shubhi