cancel
Showing results for 
Search instead for 
Did you mean: 

Why STM32Cube_FW_H7_V1.2.0 ethernet sample code not run in nucleo-h743zi board

Yi Zhou
Associate III
Posted on July 03, 2018 at 17:56

Hi all:

    STM32Cube_FW_H7_V1.2.0 ethernet sample is using DHCP, I want use static IP address. So I change the DHCP definition to 0 in lwipopts.h.

&sharpdefine LWIP_DHCP               0

    After comple the code and download to board, but I can not ping to board. What is wrong?

    Thanks.

#stm32h7-ethernet #stm32h
14 REPLIES 14
martonmiklos
Senior

I have been debugging the mentioned topic for 4 days.

When I have considered the CubeMX generated code is out of luck I moved to thex example shipped with the STM32H7 pack of the cube:

LwIP_HTTP_Server_Netconn_RTOS

It took me a while to get it compiled under Atollic, and then I have realized that the board receieves packets, responds to ARP queries, but does not sends ICMP ACKs.

By further debugging it turned out that sometimes it ACKs the pings, but most of the times it just relies the ping ICMP packet with the same source/dest address as it recieves from the host.

First i thought that it is this LwIP bug, but it turned out to be different:

https://savannah.nongnu.org/bugs/?func=detailitem&item_id=54669

After reading through this:

https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

I have realized that the MPU config in the example differs from the attached one.

After using the config from the FAQ the ping requests working just fine...

It took me 4 days to figure this out...

martonmiklos
Senior

I have been debugging the mentioned topic for 4 days.

When I have considered the CubeMX generated code is out of luck I moved to thex example shipped with the STM32H7 pack of the cube:

LwIP_HTTP_Server_Netconn_RTOS

It took me a while to get it compiled under Atollic, and then I have realized that the board receieves packets, responds to ARP queries, but does not sends ICMP ACKs.

By further debugging it turned out that sometimes it ACKs the pings, but most of the times it just relies the ping ICMP packet with the same source/dest address as it recieves from the host.

First i thought that it is this LwIP bug, but it turned out to be different:

https://savannah.nongnu.org/bugs/?func=detailitem&item_id=54669

After reading through this:

https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

I have realized that the MPU config in the example differs from the attached one.

After using the config from the FAQ the ping requests working just fine...

It took me 4 days to figure this out...

martonmiklos
Senior

I have been debugging the mentioned topic for 4 days.

When I have considered the CubeMX generated code is out of luck I moved to thex example shipped with the STM32H7 pack of the cube:

LwIP_HTTP_Server_Netconn_RTOS

It took me a while to get it compiled under Atollic, and then I have realized that the board receieves packets, responds to ARP queries, but does not sends ICMP ACKs.

By further debugging it turned out that sometimes it ACKs the pings, but most of the times it just relies the ping ICMP packet with the same source/dest address as it recieves from the host.

First i thought that it is this LwIP bug, but it turned out to be different:

https://savannah.nongnu.org/bugs/?func=detailitem&item_id=54669

After reading through this:

https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3

I have realized that the MPU config in the example differs from the attached one.

After using the config from the FAQ the ping requests working just fine...

It took me 4 days to figure this out...

MX_Master
Associate II

Hi, I made a new example project using STM32Cube_FW_H7_V1.3.0. You can find it here

https://github.com/MX-Master/STM32H7_Nucleo-H743ZI_Ethernet_LwIP

This project uses LwIP stack without RTOS. There is a HTTPD (web server) example too.

Configuration info can be found in the README.

Many thanks for putting together this repo!

I have missed the settings of the GPIO slew rates!