SPI LCD plus CAN Bus on N6 cameras

I’ve been successfully running several sizes of 320 x 240 ILI9341 or ST7789 LCDs on the SPI2 port (same as the LCD shield). Would it be possible to setup a CAN bus at the same time, on another port (besides CAN1 P2 and P3 that are shared with SPI2) such as P4/P5 or P7/P8 or even P14/P13?

The N6 only supports one CAN transceiver that shares pins with the SPI bus. If you want to add a second CAN interface, your best bet is the MCP25625 SPI-to-CAN bridge with its own chip select, and you can create a driver for us using an AI coder.

The N6 does have a second CAN transceiver, but it’s not supported by MicroPython right now, and it’s on the 4 SPI bus pins that are shared with gigabit Ethernet pins that are hard to get to on the N6. This won’t be enabled in the short term.

After more reading… so disabling gigabit ethernet (removing resistors) on P15, P16, P17 and P18 so that the SPI LCD can go on SPI4 seems supported and then CAN1 can be used on its native pins P2 and P3. I understand that FW 5.0.0 does not yet support CAN but there are dev releases that do.

The dev releases support the primary CAN interface, but for the secondary one, you need to actually enable the driver in MicroPython. The issue, though, is that it isn’t as simple as enabling the second transceiver. The CAN driver itself needs to be modified to support the interface.

Ah! I see what you are saying, yes, actually, what you are saying can be done right now. Sorry, my previous post was on that the CAN interface on SPI4 pins can’t easily be used (yes, there’s a second hardware CAN on the N6, but, it’s blocked by upstream driver support).

SPI4 works though today otherwise, so, if you make a custom shield connector then you are good.

Great. To use SPI4, do I have to move the four 0-ohm resistors/jumpers next to P15, P16, P17 & P18 to their next location? That would physically disconnect those pins from the gigabit ethernet support to basic GPIO function supporting SPI4.

Yes, you have to move the 0-ohm resistors over to the pads right next to them to unlock the SPI4 bus pins. The gigabit Ethernet is then lost. However, 10/100MB ethernet still works. So, it’s just a speed loss.

Good. Thanks! I’ll wire up a N6 when I get some time and try that configuration… LCD on SPI4, CAN on CAN1. I also have I2C2 for LCD touch and 5-way nav switch on a MCP23008.