ESP + (R)MII Ethernet MAC + Hardware Flow Control UART (RTS/CTS) + Flash
Posted: Thu Nov 02, 2023 7:58 pm
Hey all,
I'm trying to design a board around an esp module, not carrying so much which chip is used but do want to have a certain peripherals.
A simple list of requirements:
I need an Ethernet MAC interface, ideally RMII as that saves a lot of pins and is quite well documented on how to use (RTL8201F is for example a good candidate for the PHY).
Secondly, the ESP module will speak to a serial device, which communicates with hardware flow control (RTS/CTS, so this is not an optional feature) at a fixed baud rate of 1Mbit, though for discussion sake, lets assume it talks at 5Mbit, which is the ESP's max.
Thirdly, I need flash to store the application, PXE booting is not an option, but if there's alternative's I'm happy to hear.
Finally, a module is best, as it contains the PCB antenna and is pre-certified. This is quite important :p
However the combination's I'm after, do not seem to compute
First of all, it seems only the ESP32 seems to have an Ethernet MAC, so I've been looking mostly at the WROOM variant.
Here we have our RMII capable Ethernet MAC, great. However, if we want to have hardware flow control, the options become more difficult. UART1 as a whole, is on the same pins as the flash. Why these pins are exposed, baffles me a little, though I suppose alternative QSPI users, on a 2nd Chip select could be used ...
UART2's RTS and CTS are also shared with the flash pinout.
Then there's UART0, which could be used for both scenario's, e.g. only use it for the control of my device, but when in bootloader mode, it falls back into programming mode. The signals are used for their intended use, just the software configures the port at different speeds, no problem to me (the other end might not like seeing strings at the incorrect speed, but we'll see). However, the CTS and RTS are shared with TXD0 and TXD1 of the ethernet MAC. WHY I cringe, why are they not on the TXD2 and TXD3 if they must be there :p So those are not an option either.
I'm not sure if we can use the direct IO mapping for the TX/RX pins, but use the GPIO matrix for the RTS/CTS and what the performance impact is thereof? The manual seems to warn us for high-speed usage to avoid the GPIO matrix. And since all 4 pins are available here, I would expect that at 1+ Mbit, this matters, but here the documentation lacks information.
At what speeds is it wise to use the direct IO mux?
Can we map the CTS/RTS on any GPIO pin via the GPIO mux, while keeping the RX and TX on the IO mux?
Is there truly no other ESP chip with ethernet MAC? The product selector seems to say so ...
Thanks,
I'm trying to design a board around an esp module, not carrying so much which chip is used but do want to have a certain peripherals.
A simple list of requirements:
I need an Ethernet MAC interface, ideally RMII as that saves a lot of pins and is quite well documented on how to use (RTL8201F is for example a good candidate for the PHY).
Secondly, the ESP module will speak to a serial device, which communicates with hardware flow control (RTS/CTS, so this is not an optional feature) at a fixed baud rate of 1Mbit, though for discussion sake, lets assume it talks at 5Mbit, which is the ESP's max.
Thirdly, I need flash to store the application, PXE booting is not an option, but if there's alternative's I'm happy to hear.
Finally, a module is best, as it contains the PCB antenna and is pre-certified. This is quite important :p
However the combination's I'm after, do not seem to compute
First of all, it seems only the ESP32 seems to have an Ethernet MAC, so I've been looking mostly at the WROOM variant.
Here we have our RMII capable Ethernet MAC, great. However, if we want to have hardware flow control, the options become more difficult. UART1 as a whole, is on the same pins as the flash. Why these pins are exposed, baffles me a little, though I suppose alternative QSPI users, on a 2nd Chip select could be used ...
UART2's RTS and CTS are also shared with the flash pinout.
Then there's UART0, which could be used for both scenario's, e.g. only use it for the control of my device, but when in bootloader mode, it falls back into programming mode. The signals are used for their intended use, just the software configures the port at different speeds, no problem to me (the other end might not like seeing strings at the incorrect speed, but we'll see). However, the CTS and RTS are shared with TXD0 and TXD1 of the ethernet MAC. WHY I cringe, why are they not on the TXD2 and TXD3 if they must be there :p So those are not an option either.
I'm not sure if we can use the direct IO mapping for the TX/RX pins, but use the GPIO matrix for the RTS/CTS and what the performance impact is thereof? The manual seems to warn us for high-speed usage to avoid the GPIO matrix. And since all 4 pins are available here, I would expect that at 1+ Mbit, this matters, but here the documentation lacks information.
At what speeds is it wise to use the direct IO mux?
Can we map the CTS/RTS on any GPIO pin via the GPIO mux, while keeping the RX and TX on the IO mux?
Is there truly no other ESP chip with ethernet MAC? The product selector seems to say so ...
Thanks,