cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP + FreeRTOS Ping Issues

merakian
Associate II

Hi all,

I've been working through this tutorial: How-To-Create  to bring up LWIP + FreeRTOS on the STM32H735IGK development kit. I'm using STM32CubeIDE 1.18.0, FreeRTOS with CMSIS-v1, and STM32Cube FW_H7 version 1.12.1

I noticed that pinging is very sporadic, and the STM32 eventually stops replying to ARP requests. I've attached a couple of pictures(wireshark captures) that describe the problem.

arp_stops_responding.png

ping_intermittent_wireshark.png

intermittent_ping.png

For reference, here are relevant screenshots my MPU settings, linker script, ethernetif.c, and lwiopts.h files.

 

ethernetif.png

linker.png

lwiopts.png

mpu.png

However, if I disable D-Cache, then pinging becomes stable (I'm able to ping for > 30 minutes continuously). I don't want to disable D-Cache, as my MPU should be disabling caching for the relevant memory regions.

I understand that MPU regions have priority, and I'm overlaying region 2 onto region 1, but both regions disable caching. What's going on here?

Please let me know if there additional information that you may need.

Thank you!


@Piranha, @STea, @Pavel A. 

    

3 REPLIES 3
Pavel A.
Super User

Looks like some RX or TX memory that should be made non-cached still is not covered by MPU settings. Have somebody to review your code.

 

Wood.Andy
Senior

Hi

Did you manage to solve this?

I am using an H723 Nucleo board and having the same problem.

If I start with a non RTOS project it pings forever.

Add FreeRTOS and it stops after a few minutes.

D-Cache disable does not have any effect.

ioc and linker files attached.

Thanks

Andy.

 

Wood.Andy
Senior

I was using an example from - 

https://github.com/stm32-hotspot/STM32H7-LwIP-Examples

And it was using the 723 one.

It was using CMSIS_V2 API In FreeRTOS

This link says H7 can only use V1 -

https://community.st.com/t5/stm32-mcus/implementing-a-lwip-and-freertos-v1-udp-echo-server-on-the/ta-p/780261

And he is correct, it works great after changing it.