Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4941

Interfacing (DSI, CSI, I2C, etc.) • Re: MCP2515 crash after one message everytime

$
0
0
1. You don't need "dtoverlay=spi-bcm2835-overlay" - the spi-bcm2835 overlay hasn't existed for years.
2. Unless you have custom overlays, neither "mcp2515-can0" nor "mcp2515-can1" have "spi0-0" or "spi0-1" properties. (Use "dtoverlay -h mcp2515-can0" to find out what is supported)
mcp2515-can0 expects an mcp2515 on spi 0.0 (spi0.1 for mcp2515-can1) - again, this is in the help for the overlays. I don't have your schematic, but I'm suspicious that you have effectively cross-wired the interrupts - it looks like you are expecting the device on spi 0.0 to use GPIO 25 for its interrupt and GPIO 24 for spi 0.1, but the overlays are actually declaring the pairings as the other way round.

Does this work any better?:

Code:

dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=24

Statistics: Posted by PhilE — Mon Feb 05, 2024 9:47 am



Viewing all articles
Browse latest Browse all 4941

Trending Articles