EmbeddedRelated.com
Forums

lwIP vs. uIP on LPC2368

Started by Dick Balaska August 30, 2009
Hi ho,

[ LPC2368 FreeRTOS via Eclipse/yagarto ]

I am trying to get lwIP to work. I have uIP working. I notice none of
you ever discuss lwIP and there are some spatterings about uIP. It
seems to me that lwIP is much more powerful, like with DHCP. Do none of
you use lwIP?

Part 2: Does anyone have a "ethernetif.c" for the 2368? (I don't know
which phy, it's a standard development board.)

I just can't get this part to talk right under lwIP. I get interrupts,
i see the receive DMA ring buffer advancing, but i pull garbage out of
buffer. 99% of my "packets" are identical garbage (packet type =0x406, which is undefined). I can't get it to send at all, no noise
detected from it on the wire.

I have many times gone over the config of the uIP vs. the lwIP. It
looks like i'm banging the hardware identically, but obviously, i'm
not. I can't see how i am stuffing this up. Has anyone got this
working? LPC2368 and lwIP under FreeRTOS?

Oh, and this is an emergency. I demand answers. (I already tried
http://lmgtfy.com/?q=LPC2368+lwIP )
Danke in advance

dik

An Engineer's Guide to the LPC2100 Series

> I am trying to get lwIP to work. I have uIP working. I notice none of
> you ever discuss lwIP and there are some spatterings about uIP. It
> seems to me that lwIP is much more powerful, like with DHCP. Do none of
> you use lwIP?

lwIP is very widely used and has its own mail list.
>
> Part 2: Does anyone have a "ethernetif.c" for the 2368? (I don't know
> which phy, it's a standard development board.)
Just had a quick look and there seem to be two examples in the files section
of this group. No idea how good they are though.
>
> I just can't get this part to talk right under lwIP. I get interrupts,
> i see the receive DMA ring buffer advancing, but i pull garbage out of
> buffer. 99% of my "packets" are identical garbage (packet type ==
> 0x406, which is undefined). I can't get it to send at all, no noise
> detected from it on the wire.

Take a look at the Ethernet drivers (emac.c) contained in the FreeRTOS
LPC1768 demos. These are a bit more sophisticated than the ones included in
the LPC2368 demos but I think they are compatible. You would have to change
the interface as they are written for uIP but they will be 95% of what you
want.

> I have many times gone over the config of the uIP vs. the lwIP. It
> looks like i'm banging the hardware identically, but obviously, i'm
> not. I can't see how i am stuffing this up. Has anyone got this
> working? LPC2368 and lwIP under FreeRTOS?
>
There are some good examples of using lwIP with FreeRTOS, but maybe not on
the LPC2368. For example:
http://developers.stf12.net/just-another-eclipse-demo-str91x#TOC-Download
> Oh, and this is an emergency. I demand answers. (I already tried
> http://lmgtfy.com/?q=LPC2368+lwIP
> )

Glad to be able to serve you :o)

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.