cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h723 lwip configuration problem

Muhammed Güler
Senior III

I wanted to replace my system that used to work with stm32f407VGT6 with STM32H723VET6 as it is cheaper.

I designed a new pcb, followed the steps in the link below and created a project.

https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working

I got hardfault every time I compile the code and throw it to the processor.

While reviewing the processor datasheet, I saw that the ram areas he suggested to use in the example were 16KB instead of 128KB in the STM32H750.

Default address of LWIP_RAM_HEAP_POINTER (RAM Heap Pointer) 0x30044000 corresponds to non-existent memory in STM32H723VET6

each time I got HardFault from the function below.

StartDefaultTask

MX_LWIP_Init

tcpip_init

lwip_init

mem_init

Does anyone have any suggestions about problem?

1 ACCEPTED SOLUTION

Accepted Solutions
Muhammed Güler
Senior III

I think I solved my problem.

My first error was that I noticed that the address 0x30044000 was not in memory, it was solved after reading enough. My second connection problem is that I cannot enter the settings of DP83848.

After dealing with several different people's code edited from lan8742, I did a silly experiment.

I extracted the configuration settings in ethernetif.c file running in STM32F4 and replaced them with the LAN8742 functions in the STM23H7 project.

the hardware abstraction layer has done its job nicely and I have a working ethernet application.

Does anyone know why the PHY setting section in STM32F4 has turned into nonsense in STM32H7?

View solution in original post

4 REPLIES 4
Muhammed Güler
Senior III

I have edited the ethernet lwip and mpu addresses to start from 0x30000000. Hardfault does not occur anymore. But I cannot send or receive data from ethernet. my cubemx configuration is attached

Piranha
Chief II

You are the developer and you must decide where to put your buffer variables. Look at AN4891 to see which peripheral can access which memories.

As for other problems - clicking Cube cannot fix broken code...

https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

Muhammed Güler
Senior III

I think I solved my problem.

My first error was that I noticed that the address 0x30044000 was not in memory, it was solved after reading enough. My second connection problem is that I cannot enter the settings of DP83848.

After dealing with several different people's code edited from lan8742, I did a silly experiment.

I extracted the configuration settings in ethernetif.c file running in STM32F4 and replaced them with the LAN8742 functions in the STM23H7 project.

the hardware abstraction layer has done its job nicely and I have a working ethernet application.

Does anyone know why the PHY setting section in STM32F4 has turned into nonsense in STM32H7?

Piranha
Chief II

It's good that you got it somewhat working, but my first post is still valid. :)