MCP2515 over Rpi SPI

Hello everyone,

I don’t know if anyone have any experience with it, but I just can’t get the mcp2515 to work with the Mangoh Red over the Rpi SPI port. I tried to assign multiples IRQ, but it won’t work at all.
The purpose of doing this is to have 2 CAN buses connected over SPI, instead of using the CAN IoT board that only has 1 channel.

echo -n 0,2,1,0,0,0,1,0,0,0,0,mcp2515 > /sys/devices/7c00000.hsic_host/usb1/1-1/1-1.1/1-1.1:1.0/channel_config

echo -n 0,2,0,0,0,0,1,0,0,0,0,mcp2515 > /sys/devices/7c00000.hsic_host/usb1/1-1/1-1.1/1-1.1:1.0/channel_config

When I check can0, it’s not receiving any message.

Please, let me know if you have any suggestion.
Thank you!

I think your echo commands are incorrect. I had these notes written down for myself:

channel_id (chip select), chip-select enable, irq pin, clock phase, clock polarity, chip-select pin mode (0=open_drain, 1=push_pull), clock frequency (0=12M, 1=6M, 2=3M, ... 7=93.8K), delay mask,
                       2,                  1,      -1,           0,              0,                                                1,                                                0,          8,
inter-byte-delay, pre-assert delay, post-assert delay, modalias
               0,                0,                 0,   spidev

The first field is chip select. So you will want values of 1 and 2 for your two different chips assuming that you’re using the chip select pins available on the RPi connector.