Hi,
I have been trying to configure CAN-BUS on the JETSON NX development board with a CAN transceiver SN65HVD230.
My requirement is to to make a change on CAN clock rate in device tree. I am completely new in linux field and i want to make my CAN clock rate to 40MHZ. Can you provide any device tree related documents, tools which is used to update device tree. Also the procedure for decompiling the image and how to update the device tree and how to flash it again to the board.
Please explain the build and image creation procedure and how we can replace the dtb.
Also, by default, CAN clock rate requested is 50MHz from MTTCAN kernel driver. So to use 40MHz, make below change in driver:
The mttcan kernel driver sets the CAN clock rate. Follow the instructions in the Kernel Customization topic’s section Obtaining the Kernel Sources with Git to obtain kernel source code, then update the clock rate in the mttcan driver as in this code snippet:
.set_can_core_clk = true,
.can_core_clk_rate = 50000000, //// modify here (in Hz) so it should be 40000000
.can_clk_rate = 200000000, //// four times of core clk rate
Build the kernel and flash with the new kernel Image.
You can also directly copy mttcan.ko in the target under /lib/…
Hi,
I was following the procedure of kernal customization. But after building the kernel there is something related to signing the kernel and dtb files. Can u give detailed document for kenel signing procedure because am unable to find the script you mentioned in the procedure ( ./l4t_sign_image.sh ).
Hi,
When i buiding externel kernel modules its showing j]kernel configuration is invalid. Please go through the following command and errors.
command: make ARCH=arm64 –C /linux-headers-4.9.140-tegra-linux_x86_64 M=$(pwd)
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.
Hi Shubhi,
I found the following discussion and in that you are explaining the same problem of mine. For this issue is it required to build the whole image or simply we can edit the device tree as per your suggestion. Also please mention whether we need to do below procedure in the host system or Jetson system. Thank you
Hi,
Thank you. I found the script. Now i can able to flash. But as i said earlier i have to edit the device tree and enable Pllaon because i want to make CAN to work in 40 Mhz speed . I am following the procedure provided in the developer guide.
But i have a doubt in editing of clocks-init section. I mentioned the part below:
Edit the kernel DTS file to make CAN use PLLAON as parent and remove PLLAON from list of clocks to be disabled:
clocks-init{
compatible = “nvidia,clocks-config”;
disable {
/* Edit clocks property to remove clock provider + clock id pair for PLLAON. */
};
};
Here what we need to put inside disable part. Thank you.
Hi aravind,
Remove 0x5e from the disable section.
If it is like below:
clocks = <0x15f 0x5e 0x4 0x9 0x4 0xb>;
change it to:
clocks = <0x15f 0x4 0x9 0x4 0xb>;