cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to configure Ethernet as RMII

ggowd.1
Associate III

Hello Team,

 

We are prepared our own board for Ethernet Configuration in STM32H745ZIT6 Board then configured peripherals what we need to use in ethernet after configuring ioc file while debug mode every time it will go error handler when it initialize the lan8742 will checking condition of

LAN8742_Init(&LAN8742);

it will go for error handler how to find solution for this.

 

PAF of schematic of board details and in code where I am getting problem.

 

Best Regards,
Gagan Gowda

4 REPLIES 4
STea
ST Employee

Hello @ggowd.1 ,

After examination of your design, I think that you are missing somethings, and the problem is mainly with you Hardware interconnection between the PHY and MCU as well as the PHY and RJ45 PORT.

here is the Schematics that should be followed for Ethernet for the Nucleo board as a reference

STea_0-1717166408874.png 

STea_1-1717167209686.png

After a deep examination of your Schematics (c90 and c91 are missing their third brother. check the ref design) it seems that you are using the right pins for the Ethernet config from MCU side. know regarding the code section that is going to the error handler it is not clear in your description of you passing the LAN8742_init() function and getting stuck in the Ethernet _link_ check_state() or you are getting blocked in the LAN8742_init() ?

to make sure that we can eliminate the PHY interacting with the MCU potential issue using an oscilloscope make sure that the PHY is clocking correctly check the RMII_REF_CLK signal if it is correct and precise.

Regards 

 

 

 

In order 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.
ggowd.1
Associate III

Hi  STea,

 

I have checked in NUCLEO-H745ZI microcontroller in RMII_REF_CLK in that i am getting 50MHZ sin waveWhatsApp Image 2024-06-01 at 12.20.36 PM.jpeg

 

When i am check in our piggy board STM32H745ZIT6 microcontroller in RMII_REF_CLK i am not getting sin wave and clock in that, in code i am getting struck in this function 

netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &ethernet_input);

 I need know in RMII_REF_CLK PIN 50MHZ clock is generated by Lan8742 MCU or stm32h745zi MCU IMG_0557.JPG

In the above photo inside ethernet connector we are having isolator.

PFA of code

Best Regards,
Gagan Gowda

 

Hi  STea,


Waiting for your reply.


Best Regards,
Gagan Gowda

 

Hello @ggowd.1 ,


The 
RMII_REF_CLK pin typically receives a 50 MHz signal from the PHY. This is indicated by the reference to ETH_RMII_REF_CLK being a digital input, which means it is expected to receive the clock signal from an external source, such as the Ethernet PHY. 
Here is the section in RM0399 detailing this:

STea_0-1717408437262.png

If you are not getting this signal you need to check your Y2 oscillator and make sure it is providing the 25MHZ needed for PHY.
Regards

 

In order 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.