Does the SPI.h lib support the second SPI HW module on the Due?

I'm using an Arduino Due with Ethernet Shield v2. Accoring to the unofficial pin layout diagram the SPI communication goes via the "SPI" (MISO, MOSI, etc.) header.

Consequently the SPI interface MISO2, MOSI2, etc. on the "ICSP" header are free for usage.

However in the source code of the Arduino Due Board Support package I was not able to find some reliable info about if the second interface is supported by the SPI.h lib. According to some pin mapping it's not.

Does the SPI.h libb support the second SPI interface of the Arduino Due?

There's only one SPI interface on the Due. The ICSP header is for programming the 16U2 serial/USB interface chip.

The MCU on the DUE has up to six SPI interfaces. Whether the pins are broken out or not is a different question.

After looking into the souce code of the official lib I discovered that only MISO, MOSI, etc. pin related SPI is supported. In general it would be possible to patch the lib and add support for the MISO2, MOSI2, etc. pin related SPI as well. However as @Martin-X pointed out this seems to conflict with interface chip.

If you're not married to using the DUE, there are several boards that support multiple SPI ports. For example - Teensy 3.5/3.6/4.0/4.1, Arduino Zero, Adafruit M0 Feather. The last two of these use the SAMD processor. Adafruit has a tutorial explaining how to instantiate additional SERCOM interfaces (including SPI) with that device:

@gfvalvo I am not married to anyone at all :grin: I'll think about it.