Ethernet - RMII vs MII
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 1:17 PM
I'm working on an application that requires Ethernet on an STM32F765 chip and there are two options to attach an Ethernet PHY to the MCU: RMII and MII. Deciding on which interface to use has led me to a post that mentioned RMII having issues on STM32 MCUs. Granted, the post is old and refers to the F4 (I'm using the F7), but I'd like to take a poll of what others have experienced with using either RMII or MII. Which one would you recommend and why? What issues have you experienced?
My preference would be to use RMII due to the lower pin count, but it requires a higher clock frequency.
Thanks in advance for your feedback!
- Labels:
-
Ethernet
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 2:09 PM
RMII works fine.
The ethernet/lwip bugs in HAL are due to software issues, not hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 4:09 PM
Thanks for the reply. I figured that the issue was not related to hardware, but unless one aspires to write their own Ethernet driver, you're stuck with the HAL. In that case, would it be advisable to use MII?
Or have the bugs been fixed? The post I referenced is 6 years old. Not sure if ST addressed these issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 11:06 PM
ST has a lot of errors in lwip. This is terrible.
On stm32f407vgt6 I even have "tcp echo server" not working in stm32cubemx 6.0.1+lib 1.25, although in stm32cubemx 4.27+gb 1.21 it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-20 11:51 PM
All linked post says, that with RMII you should design hardware appropriately to the 50MHz signalling, starting with a decent clock.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-21 2:02 PM
I have RMII working flawlessly on a two layer 1,6 mm board. If the board is designed properly, 50 MHz is not very high frequency.
For a clock typically you either put a separate crystal for PHY chip, feed HSE through MCO pin or feed HSE and PHY from other source. Take a note that, when using MCO pin, you cannot source it from PLL because that clock has a significant amount of jitter.
There is a minor errata issue for RMII, but that is easy to work around and is only present on revision A chips, which most likely by now are gone from warehouses anyway.
Regarding HAL/CubeMX bloatware - using MII will not change anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-21 4:17 PM
> 50 MHz is not very high frequency..
That does not mean it can't be spoiled on a 6- or 8-layer board, with a bit of effort....
https://community.st.com/s/question/0D50X00009XkaBWSAZ/ethernet-through-rmii-on-stm3240geval-anyone
:)
JW
