2017-11-25 11:17 AM
Hello I am using this microcontroller for a project with ethernet. From what I've been reading everyone recommends that I use MII instead of RMII since RMII incurs in a lot of packet loss. And reading the errata I noticed that there is a problem with the PLL (MCO) because of jitter and the workaround for this problem in MII mode is to use a 25 MHz external crystal to generate the HSE clock and output the clock signal on the MCO pin to clock the PHY.
Couldn't I simply use a separate 25MHz oscillator especifically for the PHY? Or does it have to synced with the microcontroller?? According to
https://www.reddit.com/r/AskElectronics/comments/269tvh/mii_vs_rmii_on_stm32/
Simply using a separate oscillator instead of the MCO pin would suffice (one oscillator for the microcontroller and another for the PHY instead of connecting MCO to the PHY). Is this correct?What I want to do is use the internal oscillator of the microcontroller and the PHY .. something like the images attached ... where z-phy is the connections to the phy and z-stm32 the connections to the microcontroller.
From what I've been reading this is not good, since I'd need a stable clock for the microcontroller as well ... meaning that the only modification to my schematic would be to add an oscillator for the microcontroller .. am I right?
#ethernet #lwip #stm32f22017-11-25 12:54 PM
Feeding the HSE (25 or 50 MHz) clock out the MCO is a viable approach, you could also feed the same clock to both HSE_IN and XI/REFCLK.
2017-11-25 03:34 PM
Thank you for your response.
So you're saying that maybe I can feed both clock inputs with the same oscillator? I read somewhere that maybe I could use the MCO pin to feed XI/REFCLK if I was using a 25MHz oscillator for the HSE
2017-11-25 04:25 PM
Yes you could feed HSE or HSE/2 out via the MCO (PA8) pin.
2017-11-30 02:43 AM
Sorry it took me such a long time to answer. What I mean is, does this resolves the issues in the errata? Am I going to get packet loss due to clocking? Is it better to use 2 separate oscillators instead of feeding the microcontroller with 25MHz and using the MCO pin to clock the PHY?