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 https://devtalk.nvidia.com/default/topic/1057158/jetson-tx2/guide-to-enabling-mcp251x-mcp2515-on-the-tx2-spi-can-/

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 https://elinux.org/Jetson/TX2_SPI, 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: https://devtalk.nvidia.com/default/topic/1042569/jetson-tx2/mcp2515-with-jetson-tx2/?offset=5#5297178

Thanks & Regards,
Shubhi Garg