I'm trying to connect 2 CAN lines to an RPi using 2 MCP2515 connected both to SPI0 (one with CE0 and the other with CE1) using GPIO27 and GPIO5 as the interrupt pins. I'm using the following configuration in config.txt:
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=27
dtoverlay=spi-bcm2835-overlay
dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=5,cs=1
I'm not able to connect both lines, but if I comment one of them it works fine. Can anyone help me? Thanks