Skip to main content
abeba.1
Associate III
November 13, 2022
Question

udp client -at atm32h753 board ethernet-lwip

  • November 13, 2022
  • 3 replies
  • 2739 views

hii

i have the stm32h753 nuclio board and i am trying to run udp client on the board and my pc will be UDP_SERVER , i am using udp_echoclient_connect() and  udp_echoclient_send()  functions, that are inside the files that is included in the project examples folder .

i attached all the relevant files in my project

i the main function i just want to send one udp message to the server (pc) using udp_echoclient_send() 

my main problem in the cpu goes to hardfault and i don't know why !! 

when i comment udp_echoclient_send()  the project runs and i can ping the board successfully , but when i uncomment udp_echoclient_send()  the cpu goes into hard fault

i attached the relevant files in my project .

i be glad for help :)

This topic has been closed for replies.

3 replies

Technical Moderator
November 14, 2022
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
abeba.1
abeba.1Author
Associate III
November 14, 2022

hii thanks for your reply :)

i changed and configured my design to work with freertos and i can ping the board successfully.

and added the code of sending udp data to my main function in the default task just like in the first link that you provided , and still i don't see the message appear in my udp terminal .

on the other hand i run udp client in python and i see the message in the udp terminal .

it feels to me that something i still messing in the code like the udp_send function is not really activating the send logic , i attached my main.c ,i be glad for help ' it suppose to work .

i can ping the board successfully , and i don't see any reason why it wont work

LCE
Principal II
November 14, 2022

Maybe you post some relevant code snippets?

Anyway, I ran into hard faults with ethernet stuff when I forgot to adjust the descriptor memory area (linker script) according to the declared descriptor array size.

Piranha
Principal III
November 15, 2022

Using the core lwIP API with RTOS requires doing the lwIP core thread locking. The following topic has some examples for how to do it:

https://community.st.com/s/question/0D53W00001sGiChSAK/cubemx-lwip-ethernetlinkthread-bug