cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to run Ethernet communication correctly with STM32H7 nucleo?

Bilge
Associate III

 Is there anybody who can ran ethernet communication correctly with stm32h7 nucleo?

43 REPLIES 43
KR1
Associate III

Despite actually getting the Ethernet running, I am still stumped with the same stability issues. A template, compiled using the directives described in my previous post (sans the LWIP_NETIF_API and LWIP_NETIF_LINK_CALLBACK options), crashed after about 6-7 hours of working. I'm attaching the entire project for inspection, if someone wants to take a crack at it. The linker file is STM32H743ZI_FLASH.ld (it was modified according to the STM32Cube_FW_H7_V1.3.0 examples) and the MPU_Config() was copied from the FAQ ( https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3 ). All the project option can be inspected in the STM32CubeMX project file (*.ioc). I would also appreciate if @Joerg Wagner​  could share his MWE. I would actually be able to check the differences between the two. Cheers!

MX_Master
Associate II

Hi, I made a new example project here - <LINK NO LONGER ACTIVE>

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

I spent 3 days to make all settings right.

Configuration info can be found in the README.

I imported the project, unchecked the ST-Link serial number and use a fix IP address instead of DHCP. Let's wait some hours...

I recommend to use a fix IP address because I had some problems with DHCP in the past.

Probably it solves your problem as well. Give it a try.

My devices always have FRAM to store network settings such as IP/mask/gw and server IP.

Hi, you forgot one MPU region in MPU_Config().

Did you mean 16 kB for RX buffers starting at 0x30040200?

And one more interesting thing.. why we need to protect the 16kB block starting at 0x30044000? I'm just copypasted the config of this block from the LwIP_HTTP_Server_Netconn_RTOS. I can't find any code using this block of RAM.

KR1
Associate III

It would be nice to have the DHCP capabilities though. I think that I can revamp my project for a static network for the time being. I will try to create a local network and run some test on it. It would be a shame if DHCP is buggy. I might try some tests on older series (F7) just to see how they cope with DHCP.

I have already mentioned this in my earlier post, but I have managed to get a RTOS-free project running in the past:

https://community.st.com/s/question/0D50X00009nM9wPSAS/lwip-problems-from-code-generated-via-stm32cubemx-smt32h7

It seems that your code is somewhat similar (apart from the missing MPU code block, as indicated by Joerg).

I think that I might stick with RTOS for a while (even though I am not a huge fan of it). A couple of processes in my project will benefit from running in threads (even though RTOS and HAL are the usual culprits that hinder device performance).

First of all my board with your project does not crash after a specific time.

(Duration of the test approx. 20 hours)

From 10000 pings were 18 unanswered.

Actually I can not confirm DHCP bugs.