Kernel version : jetson-linux 36.3 (JETPACK6.0)
Platform : Jetson Orin Nano Devkit (SD card)
Hello!
Previously, I successfully enabled an additional CAN bus using MCP2515 by following Jetson/L4T/peripheral/ -eLinux.org and the help of this forum. Here is my previous post.
I confirmed that the CAN1 BUS working and left it as is. Half a year later, I got to revisit this and noticed that when I try to initialize CAN1, it cannot be initialized and freezes indefinitely.
$ sudo ip link set can1 up type can bitrate 1000000
# Terminal freezes after this command, This does not happen with can0 which is native CAN
I tried different bitrates, but it didn’t matter. When it freezes, the process cannot be interrupted by Ctrl+C
nor cannot be killed with kill -9
. Other network related commands like ifnconfig
would also freeze as well after the failed CAN initialization. I also noticed that there were no SPI input or output when that command was sent.
The dmesg
shows that the mcp251x was successfully initialized while booting. Also, I could see some input and outputs on the SPI port using an oscilloscope.
$ sudo dmesg | grep mcp251x
[ 16.831695] mcp251x spi0.0 can1: MCP2515 successfully initialized.
I read other forum posts that had identical symptoms such as “Jetson Orin Nano GPIO Interrupt for MCP2515 on Jetpack 6” or “MCP2515 with Orin Nano: problems with interrupts?”. They seem to point out that the problem was on the interrupt side. But I never changed the interrupt settings or the pinmux from the previous working state.
The following is the modified part from the tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi
/* SPI1, 40pin header, Pin 19(MOSI), Pin 21(MISO), Pin 23(CLK), Pin 24(CS) */
spi@3210000{
status = "okay";
spi@0 {
// compatible = "tegra-spidev";
compatible = "microchip,mcp2515";
reg = <0x0>;
// spi-max-frequency = <50000000>;
spi-max-frequency = <2000000>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA234_MAIN_GPIO(Q, 5) IRQ_TYPE_LEVEL_LOW>;
clocks = <&can_clock>;
nvidia,enable-hw-based-cs;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
spi@1 {
compatible = "tegra-spidev";
reg = <0x1>;
spi-max-frequency = <50000000>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
};
If there are more information needed, I’d be happy to provide.
Thank you.