cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 RMII ETH external clock source

totti001
Associate II
Posted on September 23, 2013 at 16:03

Hy all,

I've a question about the RMII mode at STM32F4 mikrocontrollers. I checked the datasheet and the stm3240g-eval user guide.

So the eval board user guide say that at page 19:

''In RMII mode the 50 MHz clock must be provided to Ethernet PHY by an external oscillator. This oscillator (ref SM7745HEV-50.0M or equivalent) must be soldered on the U3 footprint (located under CN3) and jumper JP5 must be removed. This oscillator is not provided with the board.''

But the stm32f4 datasheet show that the external 25MHz is enough for the ETH RMII mode via the MCO pin.

My question is what is the correct? The ETH RMII mode need an external 50MHz clock source or I can use the MCO pin, with only one 25MHz clock source for the mikrocontroller?

#worst-forum-software-ever
6 REPLIES 6
Amel NASRI
ST Employee
Posted on September 23, 2013 at 16:13

Hi Janos,

Discussion in this

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Can%20STM32F207xx%20Generate%2050MHz%20Clock%20for%20RMII%20Ethernet%20PHY&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CD...

may be helpful for you.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on September 23, 2013 at 16:35

Szia Janos,

> But the stm32f4 datasheet show that the external 25MHz is enough for the ETH RMII mode via the MCO pin.

Surely not, or have I overlooked something? Please provide the number of page where it is said so...

Should you decide for the external oscillator, you might want to read my comments on the topic, too...

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fEthernet%20through%20RMII%20on%20STM3240G-EVAL%2c%20anyone&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3...

JW
totti001
Associate II
Posted on September 23, 2013 at 17:32

At page 175 the image show that.

Thank you for the link, I read it.

Posted on September 23, 2013 at 17:40

Depends on the PHY. The LAN8720 can take a 25 MHz source. If the processor isn't running at a multiple of 25 MHz, presumably directly from HSE which is.

To get 50 MHz out of MCO (PA8) you'd need to run the processor at a multiple of 50 MHz (ie 150 MHz for the F4), you could perhaps also use PLLI2S and MCO2 to get 50 MHz independently of the CPU clock if you didn't care for I2S.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 24, 2013 at 09:22

> Depends on the PHY. The LAN8720 can take a 25 MHz source.

Yes, but the venerable DP83848C which is used on the STM3240G-EVAL board is not of that kind.

> To get 50 MHz out of MCO (PA8) you'd need to run the processor at a multiple of 50 MHz (ie 150 MHz for the F4),

> you could perhaps also use PLLI2S and MCO2 to get 50 MHz independently of the CPU clock if you didn't care for I2S.

I would be wary of the usage of PLLs inside a SoC for this purpose. While the datasheet specifies ''some'' jitter for PLL as ''Main clock output (MCO) for RMII Ethernet'', it does not say what are the conditions for this (namely used crystal and PLL settings, or any other if applicable), specifies it as ''cycle to cycle at 50MHz on 1000 samples'' as 32ps which is most probably RMS and not peak-to-peak nor cumulative; and it's a typ not a max. I'd also expect some coupling between the digital functions and the PLL. There's also an alarming footnote, saying ''the use of 2 PLLs in parallel could degraded (sic) the jitter up to +30%. All in all, even if the PHY's documentation (AN-1548) claims workability up to 4ns jitter and its datasheet guarantees working with 800ps jitter, I personally go for an ''extra'' oscillator, rather than potential stability/reliability problems. YMMV.

Another option is to feed the STM32's clock input from the same oscillator (if it supports the load); or go for some of the modern PHYs working out of 25MHz (and supporting a 25MHz crystal, too), as Clive suggested above. The EVAL board is unusable in this respect, but there are 3-rd party devboards out there featuring such PHY.

JW

Posted on September 24, 2013 at 09:23

Double post, courtesy of this crap forum software...

Oh, and the ''worst forum software ever'' tags got removed from previous posts... I am disgusted.