cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 ETH: Troubleshooting STM32H743IIK6 Board ETH Interface Issues

adamski
Associate II

Hello everyone,
I have been struggling with the ETH interface on my board for a while now.
Since I'm stuck, I wanted to ask if any of you can help me or give me a tip on which direction to look.

I have a customised board with an STM32H743IIK6. The LAN8742A is used as the LAN transceiver. The circuit diagram of the ETH is almost the same as that in the Nucleo-H743ZI2. The LAN socket and the quartz type are different. Furthermore, the magnetics are in the socket itself. 

adamski_0-1702899874145.png

adamski_2-1702901001030.png

I have configured the software using the example of the three videos from ControllersTech via CubeMX.
https://www.youtube.com/watch?v=8r8w6mgSn1A&list=PLfIJKC1ud8ggZKVtytWAlOS63vifF5iJC
https://www.youtube.com/watch?v=Wg3edgNUsTk&list=PLFfqBXukvmtNU2DcH28Q5jGr2o0CYl-O0
https://www.youtube.com/watch?v=sQ3rgQNGKV4
The same configuration worked immediately on the NUCLEO board. I therefore assume that everything is ok from the side. It is a different package but internally the same processor.

The actual problem is that I get no response from the controller. Ping are not answered.

 

My observation:
- The controller can read the LAN Bus and creates an ARP entry with the MAC address of my computer. I was able to understand this via LWIP debug messages.
- According to the LWIP debug, messages are sometimes even sent, that I can also measure on the TX lines with the oscilloscope.
- I can talk to the Transciber via SMA without any problems and read out all the registers.
- The 50MHz on the REFCLK0 line are available
- I also cut an ETH cable and terminated it with 100R. To see the Auto-Negotation Link Pulse. This was present on both lines.
- The computer sets its interface to 100Mbps and full duplex and the controller also recognises 100Mbps and full duplex.
- Wireshark on the computer shows no communication from the controller.
- ARP listing on computer side is missing
- Uplink LEDs light up on both sides

I use
- CubeIDE 1.13.2
- STM32H7 MCU PAckage 1.11.1
- No operating system
- HAL Driver

I hope a smart person can help me with my problem.
Thanks

 

 

 

 

6 REPLIES 6
SofLit
ST Employee

Hello @adamski ,

It could be something related to the clock source: your crystal (you changed vs the Nucleo-board) is not suitable in your case?

See this thread

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.

Hello SofLit,
of course I have thought about it. However, as the communication from the PC to the controller works, but not in the other direction, I decided not to look for the fault in the crystal. Unfortunately, a crystal was installed on our circuit board that is not package-compatible. Otherwise I would have simply replaced it and tested it.

The Nucleo board uses the NX2016SA 25 MHz with 0R and 2x 5.6pF (Right)
We use the ABM3B 25 MHz with 500R and 2x 18pF (left)

adamski_0-1702975981484.png

I see some differences, but I don't know how relevant they are. If you compare this with the LAN8742A data sheet (for the 100µW Version)... https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/DS_LAN8742_00001989A.pdf 

- Frequency Tolerance at 25°C max +-50ppm is ok
- Frequency Stability over Temp max. +-50ppm is ok
- Equivalent Series Resistance max. 80R is ok
- Load Capacitance CL 8-12pF not ok but I have test it also with 2x 12pF. Nothing changed.
- Drive Level: Both boards use a type of 10µW. However, the data sheet mentions 100µW and 300µW. Since it works on the Nucleo, I assume that it should also be ok for me.

- Series Resistor: In our board 500R, with the Nucleo 0R, in the LAN8742A data sheet 500R prescribed for 100µW types. I had already short-circuited the 500R without success. 

I can measure the 25Mhz signal and also the 50MHz at REFCLK0. That's why I thought it fits.

Have I overlooked something regarding the quartz crystals?

BR Adam

Slawek_Kac
Associate

Hi,

Please share Your code project.

Hi Slawek,
Sure... The code is attached to this post.
BR Adam

First, the crystals have different options and those are listed further down in the datasheet. Looking at the main table is not enough and the main table even says "(see options)"!

Second, the load capacitance is not a value for the capacitors. Read the AN2867, this blog and this post.

 

And also this...

https://community.st.com/t5/stm32-mcus-embedded-software/how-to-make-ethernet-and-lwip-working-on-stm32/m-p/261456

Hi Piranha,
You're right, of course. It was my mistake not to consider the options of the crystal. To avoid the crystal problem, however, I have just soldered the crystal of the Nucleo onto my board with a bit of soldering acrobatics. However, the result is the same behaviour. So I would now consider 99% of the crystal issue to be ruled out. 

Thanks for the link. I didn't know this one yet. It seems to be worth gold at first look. I will familiarise myself with the topics there.

BR Adam