Skip to main content
Visitor II
January 27, 2020
Question

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

  • January 27, 2020
  • 4 replies
  • 1480 views

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);

}

    This topic has been closed for replies.

    4 replies

    Visitor II
    February 2, 2020

    Hi ,

    Can you tell me how u managed to build/

    load an Ethernet app and t which board?

    Thanks

    Eli

    Anand RamAuthor
    Visitor II
    February 6, 2020

    Hi,

    Build with scm-work bench (gcc) .

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

    Graduate II
    February 2, 2020

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

    Anand RamAuthor
    Visitor II
    February 6, 2020

    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.

    Graduate II
    February 8, 2020

    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

    Visitor II
    February 9, 2020

    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