Tiny Core Base > Raspberry Pi
Problem: Unable to Bring Up Two MCP2515 CAN Interfaces Simultaneously on piCore
milad:
Two MCP2515-based CAN modules connected via SPI
Issue Description:
I have two MCP2515 CAN controllers connected to my Raspberry Pi via SPI (spi0.0 for can1 and spi0.1 for can0). The modules initialize successfully, but I can only bring one interface up at a time.
When I try to enable both CAN interfaces:
sudo ip link set can0 up type can bitrate 500000
sudo ip link set can1 up type can bitrate 500000
can0 successfully comes up, but when I attempt to bring can1 up, the Raspberry Pi freezes or fails to enable it.
If I start with can1, it works, but then trying can0 results in
Device or resource busy
Checking dmesg | grep can shows both modules initialized:
mcp251x spi0.1 can0: MCP2515 successfully initialized.
mcp251x spi0.0 can1: MCP2515 successfully initialized.
gadget42:
https://lastminuteengineers.com/mcp2515-can-module-arduino-tutorial/
milad:
Thank you for your response!
I appreciate the information on how CAN works. However, I already understand how CAN operates and have successfully used it on DietPi. The issue I’m facing here isn’t related to the CAN protocol itself—the problem is that SPI doesn’t seem to work simultaneously for both CAN interfaces.
On DietPi, I was able to use both interfaces (can0 and can1) simultaneously without issue. It seems like there’s something specific to piCore or the SPI setup that’s causing the problem.
If anyone has experience with using multiple SPI devices concurrently on piCore, I’d love to hear suggestions!
patrikg:
Same spi addresses ?
milad:
yes , I'm using dtoverlay=mcp2515-can0 and can1 on the same bus
Navigation
[0] Message Index
[#] Next page
Go to full version