Skip to main content
APasi
Associate II
Sep 11, 2019 8:48 AM UTC
Question

H7 UDP example

Hello,

We run on platform STM32H743ZI and I made new UdpEchoClient application using source STM32H743ZI _EVAL\Applications\LwIP (in other word UdpEchoClient for Nucleo144) without RTOS!

Unfortunately , it doesn't work ...

Maybe you know about any working UdpEchoClient /Server without RTOS (location, download ?

Other question, if Udp (not TCP/Web) example RTOS is available?

PS: When I try to built trivial Ethernet sample using MX (STM32CubeIDE/MX) it says me that LwIP cannot be attached if RTOS is not enabled - ?

Thanks Alexp

This topic has been closed for replies.

18 replies

Pavel A.
Sep 11, 2019 5:24 PM UTC

What exactly means "doesn't work"? How do you configure the IP address: DHCP? static? does the board reply to pings?

Here on a different eval board (H7543 EVAL2) several LWIP examples work well, with RTOS and without.

-- pa

APasi
APasiAuthor
Associate II
Sep 12, 2019 9:16 AM UTC

Hi Pavel'

Thank you for your answer,

  • IP address static 192.168.0.10
  • Don't reply to pings from PC (echoserver 192.168.0.11)
  • Dont make connect

Maybe dou have any working example for STM32H743ZI ?

APasi
APasiAuthor
Associate II
Sep 11, 2019 5:56 PM UTC

Hi Pavel'

Thank you for your answerf,

  • IP address static 192.168.0.10
  • Don't reply to pings from PC (echoserver 192.168.0.11)
  • Dont make connect
La1
Associate III
Dec 19, 2019 8:42 AM UTC

Hi, did you find a solution ?

I'm trying to run UDP_Echo_Server example from STM32H743I-EVAL on STM32H743ZI board and i have the same problem. Application don't replay to pings and ip scanners can't find it. Doesn't matter if i use DHCP or static connection.

Pavel A.
Dec 20, 2019 1:17 AM UTC

I have Nucleo STM32H743ZI and STM32H753 EVAL2 which should be very similar to H743 EVAL2 - note the 2.

On both boards, the UDP & TCP echo and HTTP server examples in Cube H7 package v 1.5.0 worked as is,

we've only converted them from SW4STM32 to Atollic True Studio and changed the static IP address to match our private network.

All these examples are ridden with horrible bugs (see the recent threads about ethernet and LwIP),

and CubeMX-generated code is buggy. These examples, however, are not generated with CubeMX.

What's available is enough to keep the examples basically working *on isolated network* with very limited traffic.

We also noticed that after breaking into debugger for more than couple of minutes, ethernet stops receiving. This may be caused by the mentioned bugs, or not. So let the code run freely and don't connect this thing to a public LAN.

Use a 10/100 hub or switch, not a GBit.

-- pa

Piranha
Principal III
Dec 21, 2019 9:21 PM UTC

> Use a 10/100 hub or switch, not a GBit.

As Ethernet is backwards compatible, that really doesn't matter. Faster switch will work with slower devices and vice versa.

Pavel A.
Apr 18, 2021 12:09 PM UTC

Attachment: LwIP UDP echo server example for Nucleo STM32H743, ported from STM32H43-EVAL2.

It is very close to the original, except of obvious SystemClockInit change and ETH pinout specific for the Nucleo,

and UDP server fix to allow pinging from any client port (not only 7).

Built and tested with Cube H7 library v. 1.9.0, CubeIDE 1.6.0.

Included also a python client script to test the UDP server.

IMPORTANT: the CubeIDE (Eclipse) project has links into the Cube H7 library installed in custom location.

Your library likely will be in a different place, so need to edit the location in the Linked folders (.project) and Build variables (.cproject).

(I don't know how to make Eclipse recognize a linked folder path in Build variables so duplication is necessary).

--pa