We have made a custom board that uses the G120 SoM. We used SPI2 to interface with an ENC28J60 Ethernet controller. Section 8.6 of the G120 data sheet indicates that SPI2 is used for the on board flash interface and recommends that another SPI port be used. However, the G120E Dev Board uses SPI2 for a WiFi interface.
Can we SPI2 on the G120 for our Ethernet interface?
Some time ago someone mentioned, it should be used another SPI-channel because when a SPI-device should block the bus (maybe because of a malfunction) the G120 can’t access its flash and can’t do anything what results in a complete unresponding unit. But it can be used.
Our board was laid out to use SPI2, but our programmer found this in the G120/G120E data sheet:
8.6 SPI Channels
SPI2 is shared internally with the flash memory on the G120. Use of a chip select with devices on this channel is required or the G120 will not function properly. The use of another SPI channel is recommended.
Based on this and the responses in this thread, we decided to modify our board and use SPI3 for the Ethernet controller interface.
@ jbrower - glx is probably correct. On the G120 only ports 0 and 2 support interrupts (section 7.1 and 8.3 in the datasheet). It looks like you’re using port 1 for the externalInterrupt parameter in the EthernetENC28J60 constructor.