I have an application which needs a second UART and a wired Ethernet interface.
The problem with the Ethernet Featherwing as @rickkas7 has pointed out in his response to my previous post, is that the pins used cannot be reconfigured and they use the same pins (D4 and D5) which are the pins for the Xenon's second serial port.
As a solution, @rickkas7 proposed an excellent solution by using the library he created for the SC16I750
My question is can an Ethernet solution be added to a Xenon (or an Argon/Boron) using the Adafruit Feather which uses the default SPI pins and a configurable CS?
If this approach can be used, which library should one use?
That's not a question "which library" or what hardware but the limiting factor is the device OS. You would need to rewrite some portions of that (which you can via locally building the device OS).
IIRC @rickkas7 said that it's currently not possible to re-assign the Ethernet detection pins but may be a future enhancement.
Update:
He even said so in the very conversation you linked above
So don't ask the same question over and over just because you didn't get the answer you wanted.
There are TWO distinct pieces of hardware. One uses default SPI pins while the Particle feather uses SPI1 which on the Xenon would disable the second serial.
On the post you can also see @tommy_boy reply which is the answer I was looking for, namely the potential of using a wired Ethernet connection on mesh devices while retaining the ability to connect to Serial 2.
Yes, but tommy_boy did still not free the default pins for other use. ASAICT he only wanted to use the Adafruit Ethernet FeatherWing with a Gen3 device by just rerouting the default pins used on the controller board to connect to the alternative pins on the FeatherWing.
He didn’t actually free D4/D5 (as far as I understood his posts).
The Particle Ethernet FeatherWing uses the standard SPI pins. However, it also uses three additional pins:
Mesh Pin
Ethernet FeatherWing Pin
MISO
SPI MISO
MOSI
SPI MOSI
SCK
SPI SCK
D3
nRESET[1]
D4
nINTERRUPT[1]
D5
nCHIP SELECT[1]
On the Xenon, Serial2 uses the pins below, which conflict with nInterrupt (D4) and nChipSelect (D5).
Pin
Use
D4
TX for Serial2. Can be used as GPIO if not using Serial2.
D5
RX for Serial2. Can be used as GPIO if not using Serial2.
The Adafruit Ethernet FeatherWing does not assign these pins by default. You need to manually hook up jumper wires to the reset, interrupt, and chip select pins, otherwise it won’t work.
However: You cannot just choose different pins. Device OS is hardcoded to use D3, D4, and D5. This may change in the future to allow them to be configured to other pins, but that is not possible at this time.
Yes, fair enough, there could still be a problem with CS.
But wasn’t there a possibility that there is an Ethernet library that uses a different CS pin? So the question is not the same.
Also, I will check again whether the CS pin that is hard coded is the TX or RX on the Xenon. If it is the TX, it is not needed for my sensor …
IMHO, the decision to use D4/D5 is a poor one but luckily there is the library that @rickkas7 made. Perhaps the only drawback is adding another piece of hardware …