2023-12-18 04:31 AM - edited 2023-12-19 12:30 AM
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.
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
2023-12-18 07:07 AM - edited 2023-12-18 07:10 AM
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.
2023-12-19 01:14 AM
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)
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
2023-12-19 03:04 AM
Hi,
Please share Your code project.
2023-12-21 02:52 AM
2023-12-21 06:23 PM - edited 2023-12-21 06:26 PM
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...
2023-12-22 02:29 AM
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