cancel
Showing results for 
Search instead for 
Did you mean: 

lwip webserver is not loaded if multiple threads are used for receive.

Anand Ram
Associate III

working code :

void recvfrom_init(void)

{

 /* start the udp thread */

 sys_thread_new("recvfromDev1", recvfrom1, NULL, 64, osPriorityAboveNormal);

}

not working code :

void recvfrom_init(void)

{

 /* start the udp thread */

 sys_thread_new("recvfromDev1", recvfrom1, NULL, 64, osPriorityAboveNormal);

 sys_thread_new("recvfromDev2", recvfromDev2, NULL, 64, osPriorityAboveNormal);

}

6 REPLIES 6
ECrom.1
Associate III

Hi ,

Can you tell me how u managed to build/

load an Ethernet app and t which board?

Thanks

Eli

Piranha
Chief II

Better leave sys_***() functions for lwIP internal use and for your application use your RTOS's normal functions.

Hi,

Build with scm-work bench (gcc) .

for ethernet connection, ethernet swich is used for local network/connection for PC and STM32H743zi board.

hi Piranha,

Thanks for the information, i have tried that already .webserver works fine but the receive socket function is not working(frames are not received).

since these two different threads receive the ethernet frames from two different sockets with different initialization.

Can i know the reason why to avoid sys_***() functions for lwIPis there any limitations ?

Thank you in advance.

Piranha
Chief II

Those sys_***() functions are wrapper functions for lwIP to be compatible with different RTOSs. Your application code is already based on some RTOS you are using. If you are using RTOS in the rest of your application, why do you want to use it through unnecessary wrappers in some other parts of application?

For Ethernet related problems generally look here:

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

ECrom.1
Associate III

Can someone pls elaborate how exactly do I test this ?

How do I configure the PC and board in order to get the Ethernet connection and messages?

Thanks

Eli