SPI based CAN controller (Microchip MCP2515)

Hi!

I’m trying to use a SPI based CAN controller (Microchip MCP2515) with my Jetson but… not working:

$ sudo modprobe mcp251x
$ sudo ip link set can0 up type can bitrate 1000000

Output: ‘Cannot find device “can0”

What else I need to do?

Thanks!
Mauricio

Hi Mauricio

Please refer to [url]https://devtalk.nvidia.com/default/topic/1057158/jetson-tx2/guide-to-enabling-mcp251x-mcp2515-on-the-tx2-spi-can-/[/url]

Hi!

I’m trying to connect a MCP2515 module to J21 expansion header.

My version of Jetpack already has a MCP2515 module, so:

sudo modprobe mcp251x

dmesg output:

[ 3609.239709] CAN device driver interface

Now, based on Jetson/TX2 SPI - eLinux.org, I’m trying to update the device-tree, using the instructions from @Atrer (from your link), but I got an error on “gpios = <TEGRA_MAIN_GPIO(R, 0) 0>;

Error: extracted_proc.dts:10049.26-27 syntax error
FATAL ERROR: Unable to parse input tree

It’s not clear where I have to put the gpio-hog definition and clock definition.

Thanks!
Mauricio

Hi mauricio,

You can refer to this link: [url]MCP2515 with Jetson TX2 - Jetson TX2 - NVIDIA Developer Forums

Thanks & Regards,
Shubhi Garg