cancel
Showing results for 
Search instead for 
Did you mean: 

STMF746ZG with LAN8720A, Ethernet problem

enesc9
Associate

Hello,

I am currently using the Mikromedia 7 FPI Capacitive SoC with STMF745ZG MCU, which includes the LAN8720A PHY. However, I'm encountering issues as the LEDs on the PHY do not light up, and my PC shows the cable as unplugged. I have thoroughly checked all the connections and cables, but the problem persists.

One of the challenges I faced was in the CubeIDE since there is no specific LAN8720A option available. Instead, I selected LAN8742A, which seemed to have similar register addresses. With this configuration and when I enable MCO with 25MHz, I can successfully read and write to ETH registers. However, I am still unable to establish a connection with my PC. During debugging, I noticed that the Lan8742_Init process completes a soft reset and obtains the correct PHY address (0). Despite this, the link status remains as "link down." When I check the BSR registers, they also indicate a "link down" state.

I considered that the issue might be related to the CLK (clock) settings. The LAN8720A datasheet recommends using a 50MHz clock source with RMII. However, when I set MCO to 50MHz, I encounter problems such as failing to get the PHY address and being unable to read or write to PHY registers.

To provide more context, I have attached the schematics for STM32F745ZG and the diagrams for REF_CLK_In mode. In the schematics PA1 connected to MCO. In CubeIDE pinouts PA1 is ETH_REF_CLK. That's why I think I should use REF_CLK_In mode.

I would greatly appreciate any assistance in resolving this issue. If you have any insights or suggestions, please let me know.

Thank you for your help!

 

1 REPLY 1
STOne-32
ST Employee

Dear @enesc9 ,

To know if your case is solved with the 50MHz clock hypothesis ?

it may be a tolerance / sensitivity on Jitter between the MCO output ( after PLLs) and overall I/O load vs the PHY requirement. Here some screenshots on STM32 datasheets and PHY on the clock required for RMII at 50MHz . You may probe it as well to check with low capacitive probe on oscilloscope.

IMG_4513.jpeg

IMG_4514.jpeg

IMG_4516.jpeg

 let us know please for any feedback.

Ciao

STOne-32