2020-07-19 08:42 AM
Hi There,
I am trying to run the ethernet example from the 1.7.0 version of the STM32H7 firmware at STM32Cube_FW_H7_V1.7.0\Projects\NUCLEO-H743ZI\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS.
The only modifications I have performed from the provided example code is I have disabled DHCP to use a static IP address (#define LWIP_DHCP 0).
I am trying to run this on the Nucleo-H743ZI2 development board and I cannot get any response to ping. If I attach the debugger, I can see the STM32 is receiving ARP requests and trying to send out ARP responses. Additionally, if I probe the TXD0/TXD1/TXEN lines on the 8742A PHY chip I can see the lines moving periodically in response to ARP queries. Duration looks good, but I have not parsed out the individual bits.
I have tried this on multiple boards, and additionally on a custom STM32H753x board all with the same behavior.
I have also followed all advice here in this page https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3
I have also tried adding the SCB_CleanInvalidateDCache() in the ethernet low_level_output() function.
I have disabled all firewalls and verified I can ping other devices no problem.
I have double checked all SolderBridges and Jumper Wires are set correctly for ethernet based on the Nucleo data sheet.
My questions are:
Thank you for any assistance you can provide.
#NUCLEO
#NUCLEO-H743ZI2
#STM32H743ZI
#[STM32 MCUs]
#STM32H7
Solved! Go to Solution.
2020-07-20 01:50 PM
@Manu Abraham @Community member
Ok major breakthrough! Switched JP5 from 1.8V mode to 3.3V mode and everything started working perfectly on the Nucleo Dev board! I couldn't find anywhere in the NSTM32H7 Nucleo-144 boards user manual indicating you have to do this!
It looks like the PHY chip should be able to handle different logic levels using the VDDIO input but maybe that is not the case?
Thanks again for all the help!
2020-07-19 09:18 AM
Hi,
I just tried the same sample app on the Nucleo-H743ZI2 board, It works with both DHCP enabled as well as with a static IP Address.
Works like a charm.
When you disable DHCP, just make sure that you set IP address to the same class as your PC.
The default in main.h is set to 192.168.0.10
Attached hex file with Static IP address is set to 192.168.1.40, Netmask 255.255.255.0, Gateway 192.168.1.1
2020-07-19 09:34 AM
Thanks Manu!
I tried your hex file and still can't ping the board.
Anything special I have to do when programming? I just used STLink starting at 0x08000000.
2020-07-19 09:41 AM
I have configured my Ethernet adapter on my host with IP address 192.168.1.11, subnet mask 255.255.255.0
2020-07-19 11:13 AM
You are welcome.
The only change what I made to the sample code was to disable DHCP in "lwipopts.h"
/* ---------- DHCP options ---------- */
#define LWIP_DHCP 0
and set the IP Address in "main.h"
/*Static IP ADDRESS*/
#define IP_ADDR0 192
#define IP_ADDR1 168
#define IP_ADDR2 1
#define IP_ADDR3 40
It worked without any coaxing or fiddling around.
Probably, bad ethernet cable ? Could be a board problem also, but lesser probablility, since other boards also have the same issue ?
The ethernet LED's light up, when the cable is plugged in ?
2020-07-19 11:16 AM
That said, if you have a DHCP server, the example runs without any changes whatsoever.
Maybe you can add debug print to the code, rebuild and see what happens on a terminal ?
2020-07-19 12:17 PM
Thanks Again Manu. I have tried multiple Ethernet cables. Also tried Windows/Mac/Linux hosts and they can all ping each other no problem using the same cables.
I also tried the DHCP enabled version with a router and still no luck. The STM never receives any DHCP responses even though it seems like it is sending out discovery requests (probably never getting to the server).
The weird part is when debugging I can see ARP requests going into the board correctly (IP/mac address from host all look perfect). Just nothing comes out.
Yes I have tried this on both the Nucleo Dev board and a custom PCB and both show the exact same behavior.
In summary: What would cause the PHY to receive (and auto-negotiate link speed, etc...) fine, but not transmit? Probably some broken hardware but weird that I am seeing it across two completely different devices. I will try to order up another Nucleo dev board.
2020-07-19 12:59 PM
HI PMart, you say see ARP request on PHY, have you decoded them? Are them directed to MAC address of board?
Are you capturing on which side of PHY?
Is 50MHz clock from or to PHY ok?
What on register level of ETH controller?
2020-07-19 01:48 PM
Hi rromano001,
Thanks!
2020-07-19 06:21 PM
Hi, are NLP present and speed/duplex negotiated? Is this reflected on ETH controller register?
I suppose you are using original ST board so PHY driver is the right one.
On network cable side can you see modulation at almost on tx pair?
Are some sort of activity on RXD0 and RXD1?