Skip to main content
rLand.21
Associate
March 20, 2023
Solved

An issue with the LWIP UDP RX buffer (STM32H753)

  • March 20, 2023
  • 5 replies
  • 4655 views

Hello, community.

So, we are using STM32F753 and activated the LWIP library from the CubeMx.

We use a UDP socket to send strings (used as commands for our own made CLI protocol).

When reading the Rx buffer in the STM, we see that the strings are sometimes received wrong.

For example, we send the following strings over the UDP (the content itself is not important):

"ver 4d" - Received correctly in the Rx buffer

"pwmgen 100 ef" - Received as "pwer" (some kind of a mix with the previous packet)

This mix causes misreading of the string and therefore the CLI protocol not working.

We hope to find some direction to the solution.

If any more details are needed, I'll be happy to provide them.

Thanks,

Raz

This topic has been closed for replies.
Best answer by KDJEM.1

Hello @rLand.2​  and welcome to the Community :),

Please follow this article "Ethernet not working on STM32H7x3", it may resolve your problem.

Also, I advise you to take a look at this FAQ: How to create project for STM32H7 with Ethernet and LwIP stack working. This FAQ may help you to configure your project in STM32CubeMX .

I hope this help you!

Kaouthar

5 replies

Pavel A.
Super User
March 21, 2023

Is D cache enabled? Do you flush & invalidate it properly? Search this forum for related threads.

rLand.21
rLand.21Author
Associate
March 21, 2023

Hi Pavel,

Can you elaborate on the D cache thing? where do I enable it and what does it do?

Thanks!

Pavel A.
Super User
March 21, 2023

Your reply indicates that you are new to STM32F7 or Cortex-M7​ generally. ST has a Programming Manual for their Cortex-M7 family, there you can find this information.

See also this document, it applies to STM32F7 too.

KDJEM.1
KDJEM.1Best answer
Technical Moderator
March 21, 2023

Hello @rLand.2​  and welcome to the Community :),

Please follow this article "Ethernet not working on STM32H7x3", it may resolve your problem.

Also, I advise you to take a look at this FAQ: How to create project for STM32H7 with Ethernet and LwIP stack working. This FAQ may help you to configure your project in STM32CubeMX .

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
rLand.21
rLand.21Author
Associate
March 21, 2023

Ok, it seems the address configurations we have set were wrong and it looks better now in a demo.

We are now running the full application with the fix to fully test it and hopefully resolve this ticket :)

Thank you so much!

rLand.21
rLand.21Author
Associate
March 22, 2023

Thank you for the help guys!

KDJEM.1 has brought us the solution.

Really appreciated!

KDJEM.1
Technical Moderator
March 22, 2023

Hi @rLand.2​ ,

Glad to know that the issue is already fixed :).

Thank you for your contribution in STCommunity.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Piranha
Principal III
March 22, 2023

> to fully test it

Regardless of the results the HAL/Cube is an unreliable broken bloatware anyway...

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