2014-11-21 12:01 AM
Hi guys,
Currently I am working on the lwip application on STM3240G-Eval. I am planning to use the FreeRTOS with lwip. But I found out that lwip with FreeRTOS integration is not as stable as I thought. The ethernet link would be broken after a certain point of time. Sometime it happened immediately after the system reset, and sometime it happened after running for half and hour. I am pinging the target and running the STM32F2x7TASKS.html on browser. The project I have been using for this test is LwIP_HTTP_Server_Socket_RTOS. This scenario is not happened LwIP_HTTP_Server_Raw. Any idea?? #stm32 #lwip #freertos2014-11-23 05:22 PM
Hi Guys,
I tried to dig deep and find the root cause. It turns up that there's a difference between lwip with RTOS and lwip without RTOS. The latter uses polling method, while the other uses interrupt approach. It seems that after awhile, the ethernet interrupt is not captured by the MCU. Would it be a bug in the library?? I have changed from interrupt approach to polling approach to test whether the system become more stable. Keep you guys updated. Regards, WH Wong2014-12-19 07:20 AM
Hello,
Thie issue of masked Ethernet interrupts is fixed and will be available in the next release, you can fix it by replacing the ethernetif_input() function in ethernetif.c file by the following:void ethernetif_input( void const * argument )
{ struct pbuf *p; struct netif *netif = (struct netif *) argument; for( ;; ) { if (osSemaphoreWait( s_xSemaphore, TIME_WAITING_FOR_INPUT)==osOK) { do { p = low_level_input( netif ); if (p != NULL) { if (netif->input( p, netif) != ERR_OK ) { pbuf_free(p); } } }while(p!=NULL); } } } I hope it will solve your problem. Regards, LEO