cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746VGT6 with LAN8742A. RMII clock from MCO or shared oscillator

Zoran Najdovski
Associate II
Posted on January 30, 2017 at 06:52

Hi all,

I've read several forums regarding the potential ethernet instability by supplying the clock for an RMII Ethernet PHY chip from MCO of an STM32F4. This is one in particular stood out

https://community.st.com/external-link.jspa?url=http%3A%2F%2Fwww.chibios.com%2Fforum%2Fviewtopic.php%3Ff%3D3%26t%3D23%26start%3D150

. I have also seen this topic discussed in this ST community forum.

My next project is to develop a custom board for the STM32F746VGT6 with an ethernet PHY chip (LAN8742A). The STM32F746G-DISCO PHY chip (LAN8742A) shares the same clock as the F7 (NZ2520SB-25.00M) at 25 MHz. So i thought this might be the best approach for the F7. However, i have seen the F7 used with a similar PHY chip 

(LAN8720A) in RMII with the clock supplied by MCO.

What is the go-to design approach for ethernet data stability/reliability/low jitter? I am also looking to add USB to the board and will need to meet the clock requirements to run both USB and Ethernet simultaneously.

Thanks in advance.

Zok
8 REPLIES 8
T J
Lead
Posted on January 30, 2017 at 07:35

I have read and tried to implement your exact setup, but the board is not ready

:(

the main difficulty was for it all to clock correctly.

the best advice I read suggested that you supply a 25MHz clock oscillator through a 100R resistor to the LAN Chip Ethernet clock_in pin 5

and

the PA1_ETH_Ref_Clk pin 35 (of 144) is clocked either from the 25MHz source through a 100R

or

the PA1_ETH_Ref_Clk pin 35 (of 144) is clocked from another 100R routed to the LAN ClockOut pin 14

install one or the other 100R.

Also, you can use the 25MHz through another 100R to the 746 RCC Clkin pin 23 (144) if you want, but it is not necessary.

This will allow you to select another clock input frequency to suit the USB frequencies.

Check the Disco 746 schematic,  I also recommend that you dont use the LAN onboard regulator, it gets quite warm.

Posted on January 31, 2017 at 00:31

Thanks heaps Nick. Your advice complements what i have also read on the subject and the Disco 746 schematic. I haven't seen any comments on the F7 MCO being an issue, but i will avoid it for this design as i am after ethernet data stability and reliability. So, I'll basically follow:

=>supply a 25MHz clock oscillator through a 100R resistor to the LAN Chip Ethernet clock_in pin 5

and

=>the PA1_ETH_Ref_Clk pin 35 (of 144) is clocked from another 100R routed to the LAN ClockOut pin 14

install one or the other 100R.

  

and

=>use the 25MHz through another 100R to the 746 RCC Clkin pin 23 (144) to select another clock input frequency to suit the USB frequencies.

When you complete and test your board, i'd be interested to hear how you went

🙂

Cheers,

Zoran

Posted on January 31, 2017 at 01:16

I thought that you may not want to use the 25MHz source for the RCC clock, but if you can get the USB frequencies correct and still have full processor speed, then its a great solution.

Posted on January 31, 2017 at 01:47

Ah, sorry, i misunderstood. Do you recommend not connecting an external clock source to RCC clock and only utilise the 16 MHz internal HSI RC oscillator to suit USB frequencies?

Posted on January 31, 2017 at 01:56

Yes, there is no requirement to use the 25MHz as the RCC clock source,the Ethernet is satisfied already.

however if you can get all the frequencies satisfied by the 25MHz is a good solution.

but if you cannot get the full processor speed and USB frequencies, then you may consider an alternate clock source/frequency.

Posted on January 31, 2017 at 01:59

Thanks Nick. Appreciate the help.

Posted on January 31, 2017 at 02:11

Dont forget, I also recommend that you don't use the LAN chip onboard regulator.

My concern is that the chip gets quite warm and thereby becomes a source of failure as a QFN package after some years.

Posted on January 31, 2017 at 04:59

Thanks Nick. I'll definitely take that into consideration.