Electrical – LAN8710A on STM32

ethernetmicrochipmicrocontrollerstm32f4

I am working on a project in which I want to have an STM32 running FreeRTOS lwIP. I want to connect it via the MII instead of the RMII configuration. I have studied the datasheet for LAN8710A and I know how to configure the PHY and how to connect it to STM32, but as anyone would do in a personal project where you can't afford to fail (paying out of my own pocket is not fun) I searched the net for similar projects, but all I found were projects using the RMII configuration (I also have Olimex E407 board, which also uses RMII), but after a little bit of searching I found a lot of people complaining about the RMII configuration, saying that it loses many packets and it's not reliable and some people suggesting you connect an oscillator in some clock lines.

Apparently the ETH_MII_RX_CLK and ETH_MII_TX_CLK are not very reliable and very jittery and that's why some people recommend using an oscillator in those pins. My question is: do I connect the oscillator, ETH_MII_RX_CLK and ETH_MII_TX_CLK together? Should I leave the pin in the microcontroller as no-connect for the ETH_MII_TX_CLK and no-connect in the PHY for the ETH_MII_RX_CLK? Do I simply connect the pins on the microcontroller and the PHY to the oscillator? Maybe the ETH_MII_TX_CLK is the only faulty clock line (since it's the one coming from the microcontroller) and maybe I just need to connect this pin to the oscillator and PHY and leaving the microcontroller as no-connect?

As you can see, this is a bit confusing for me, but common sense is telling me to simply leave the pin as no-connect in the microcontroller and wire the oscillator to the pin in the PHY (for TX) and for RX I'd let the PHY drive the clock line, since nobody has complained about it.

Best Answer

Well, ended up creating my project anyway and forgot to answer this question.

Apparently it's not jittery and there is no problem with RMII or packet losses. My problem was that I was using stm32f2x7 which does have a problem with ethernet when clocking from MCO pins using PLL, so my workaround for that was the one found in the datasheet, use MII mode instead of RMII and do not use PLL for the MCO pin clocking the PHY.

In the end I was overthinking everything A LOT. Those workarounds mentioned in my comment were not necessary at all and if anyone needs I can edit this answer later and add a schematic.