2022-08-29 11:53 PM
Hi everyone,
I am using STM32f429, and I am using Ethernet communication.
Inside the while(1) has the mx_lwip_process() function and I am using the function every while, and I found this function takes a lot of time, so I would like to know how often I need to use this function?
for example:
int LoopDivisor=0;
while (TRUE){
// The rest of my code
if (LoopDivisor%100==0){
MX_LWIP_Process();
LoopDivisor=0;
}
LoopDivisor++;
}
In this situation I still have ping.
Thanks for the helpers!!
2022-08-30 07:34 AM
Look into using FreeRTOS with LWIP, you can have a thread dealing with all Ethernet communication while another thread is dealing with your application.
2022-09-04 10:49 AM
The low_level_input() function must be called and packets passed to lwIP whenever and as long as there are new packets received, which are still not processed. In addition without RTOS the sys_check_timeouts() function must be called every 50 ms. This particular time period is not mandatory, but this value is a perfect fit for all protocols and lwIP modules with default time intervals.