2024-05-31 05:09 AM
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
2024-05-31 08:20 AM - edited 2024-06-03 02:40 AM
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
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
2024-06-01 12:30 AM
Hi STea,
I have checked in NUCLEO-H745ZI microcontroller in RMII_REF_CLK in that i am getting 50MHZ sin wave
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, ðernetif_init, ðernet_input);
I need know in RMII_REF_CLK PIN 50MHZ clock is generated by Lan8742 MCU or stm32h745zi MCU
In the above photo inside ethernet connector we are having isolator.
PFA of code
Best Regards,
Gagan Gowda
2024-06-03 12:44 AM
2024-06-03 02:56 AM
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:
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