Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHi Chris,
From memory, version 8.x and later were shipped with InterNiche with "lwIP no longer supported". I've seen posts that lwIP was in version 7.x but I've not seen it - I started with 8. For best performance, use lwIP in RAW API mode. Since lwIP needs an RTOS for the Netconn and Socket APIs and has to use message posting to exchange data, lwIP is not very efficient with these APIs and an RTOS. In fact, it's a rule that lwIP be used only in one thread. Now, you can put lwIP in one uC/OS-II thread and use raw API mode, but you can't send data without some mechanism for that thread to grab the data to send. As receiving is normally done with callbacks, by default you're in the lwIP thread and the callback can send data directly. I use a cooperative RTOS which is much safer and because it's cooperative I can have other threads send data to the stack (because the lwIP thread isn't in the lwIP code at those times). Probably with a Mutex around *all* lwIP calls you can use a preemptive RTOS and keep it threadsafe. Once you move to message boxes to get and send data to the stack, it slows way down. Hope this helps! Bill