Have somone a guide for the Jetson Nano or some hints for me, how I can enable the MCP2515 with SPI?
Or how do I have to edit these guides for the Jetson Nano?
Choose a GPIO pin on J41 (40 pin header) and enable interrupts on that pin.
Make proper connections from MCP2515 to SPI controller on J41. There are 2 SPI controller present on J41. I have connected two MCP chips on respective SPI controller with INT pin connected to chosen GPIO.
spi@7000d600 { /* SPI 2 to 40 pin header */
status = “okay”;
spi@0 {
compatible = “microchip,mcp2515”;
reg = <0x0>;
spi-max-frequency = <10000000>;
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x6>;
clocks = <&can_clock>;
interrupts = <&gpio TEGRA_GPIO(V, 0) 0x1>;
controller-data {
nvidia,cs-setup-clk-count = <0x1e>;
nvidia,cs-hold-clk-count = <0x1e>;
nvidia,rx-clk-tap-delay = <0x1f>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
4) Make changes in Nano pinmux and GPIO dtb:
Enable SPI0 and SPI1 with SPI functionality by configuring pins(tristate disable, input enable, change function property…)
Add GPIO entry in gpio-input section.
Flash with the change in DTB.
Now on device after boot, run following commands:
ip link set can0 type can bitrate 500000
ip link set can0 up
ip link set can1 type can bitrate 500000
ip link set can1 up
candump -x any
cansend can0 123#abcdabcd
It is a bit unclear where to add the above information to the nano DTB file.
SPI has been enabled, but how to we to add the above information to get it working with the MCP2515.
Do we need to add into another dts or dtsi file, we compile into the some *.dtb ?
Also the lines <&gpio TEGRA_GPIO(Z, 0) 0x1> and interrupts = <&gpio TEGRA_GPIO(V, 0) 0x1 makes it a bit unclear what GPIO pins we are talking back on the development board.
Hi , do you have any ready made image so that I can use it? I have B00 model jetson nano ! please let me know any docs with which I can enable CAN with SPI for mcp2515