Skip to main content
HA87
Associate II
January 27, 2021
Question

Enabling Ethernet Interface on Nucleo-H743ZI2

  • January 27, 2021
  • 3 replies
  • 8458 views

Hi,

I am developing a TCP/IP server for my application on the Nucleo-H743ZI2 board. I want to use LWIP with FreeRTOS to allow threading and have a similar syntax to POSIX sockets.

So far I found the following two examples:

(1) This tutorial targets the same CPU family STM32H7 but a different board. https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working

(2) An example in STM32 Repository in the following path: STM32Cube_FW_H7_V1.8.0\Projects\NUCLEO-H743ZI\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS

However, this example does not use CubeMX which is extremely important in my case as I use it to manage many interfaces in my project (QSPI, I2C, ADC, etc)

I followed the first example steps and I adapted some stuff based on what I found in the source files of the second example. However, I could not ping the board at all. I attached project files (Test_Ethernet).

Here are the steps that I've done (I attach snapshots at the end):

  1. Created a new project on STM32CubeIDE 1.4.0 using STM32Cube_FW_H7_V1.8.0.
  2. Started configuring the project using the embedded CubeMX in CubeIDE.
  3. I select "No" to "Initialize all peripherals in default mode.
  4. Here is a snapshot of my clock configuration. I configure the clock to 400 MHz. I also set the high-speed clock (HSE) to bypass mode.
  5. Configure the Ethernet interface
    1. Setting the mode to RMII with all the GPIOs maximum output speed set to High.
    2. Enable ethernet global interrupt with preemption priority set to 5.
  6. Configure Cortex-M7. Here I enable ICache and DCache with MPU Contro Mode set to Background Region Privileged accesses only. Then, I set two memory protection units as follows:
  7. Configure FreeRTOS
    1. Enable the FreeRTOS with CMSIS_V1 API.
    2. Increase the size of the default task stack to 256 words.
  8. Configure LwIP as in example (1).
  9. Add DATA_IN_D2_SRAM to macro definitions in the project.
  10. Modify linkerscript as in example (1).

So what am I missing in my steps or configurations?

Thanks

0693W000007CsFWQA0.png0693W000007CsJJQA0.png0693W000007CsIWQA0.png0693W000007CsJxQAK.png

This topic has been closed for replies.

3 replies

HA87
HA87Author
Associate II
January 29, 2021

Any reply or hint from ST support or anyone in the ST community?

We've been stuck with this for quite some time and we tried different settings but it seems STM32CubeMX is still buggy when it comes to the Ethernet interface with some specific boards.

Uttr.1
Visitor II
January 31, 2021

I have the same problem with this board. Could anyone help with an Ethernet example created using CubeMx. Thank you.

Pavel A.
January 31, 2021

@Uttr.1​ With which ethernet example?

From my (very limited) experience with Nucleo-H743ZI2, the ST example in Cube H7 package does work (even with the buggy low level driver and other issues mentioned).

If you generate a new project in CubeIDE or CubeMX, it is not expected to work TL;DR

so always do start from these examples, do not change a single bit until it works.

-- pa

HA87
HA87Author
Associate II
February 1, 2021

@Pavel A.​ I've used that example there and it works. I even added TCP echo functionality and it also works but as I mentioned above my main issue with this example it is not based on CubeMX. I would like to have CubeMX since in my project I've to handle many interfaces and it is very convenient to do that with CubeMX.

Piranha
Principal III
January 31, 2021
HA87
HA87Author
Associate II
February 1, 2021

@Piranha​ Thanks for sharing. I've seen your threads before. It is a bit annoying that we've to dig into low-level stuff and deviate from just focusing on application development on these MCUs.