lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip port for LPC17xx micros


From: Bernard Mentink
Subject: Re: [lwip-users] lwip port for LPC17xx micros
Date: Fri, 4 Feb 2011 12:41:21 +1300

Hi Richard,

You are write, the uIP implementation is DMA driven, however the lwIP stack sample which is written for the Stellaris MCUs writes to a FiFO, I don't know if that is a DMA address on that micro , or not.
i.e in the read function you get the following:

------------------------------------------------------- code ---------------------------------------------

/* Process all but the last buffer in the pbuf chain. */
        q = p;
        do {
            /* Setup a byte pointer into the payload section of the pbuf. */
            unsigned long *ptr = (unsigned long *)q->payload;

            /**
            * Read data from FIFO into the current pbuf
            * (assume pbuf length is modulo 4)
            */
            for (i = 0; i < q->len; i += 4) {
                *ptr++ = ETH->DATA;
            }

            /* Link in the next pbuf in the chain. */
            q = q->next;
        } while (q != NULL);

------------------------------------------- end code ----------------------------------------------------

I will need to investigate what ETH->DATA is .. and replace it with a call to read the DMA channel .. and ditto for the write ..

Cheers,
Bernie

On Fri, Feb 4, 2011 at 10:48 AM, FreeRTOS Info <address@hidden> wrote:
Hi again,

The drivers in FreeRTOS are interrupt (and I think DMA (?)) driven.  The
driver moves a packet into a buffer pointed to by a chain of DMA
descriptors, thats it.  I don't see why the driver would not be agnostic
of the stack it is being used with - the packets coming in off the
network will be the same - the reception and buffering of the packets by
the DMA will be the same - only how the packets are read from the
buffers by the stack will be different and that is not part of the
driver but part of the stack.


Regards,
Richard.

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

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



On 03/02/2011 20:57, Bernard Mentink wrote:
> Hi There,
>
> Yes, I do have uIP working on the LPC1766, so I can use their drivers
> ... they don't use interrupts, just polling, so will need to do some
> hacking there
> (I am also using it with QP OS so every thing needs to be event based ..)
>
> Reason I am asking, is to try and save myself the work of porting the
> uIP driver to lwIP, which does need a chunk of work .. so if anyone has
> done it, that would be cool?
>
> Cheers,
> Bernie
>
> On Fri, Feb 4, 2011 at 9:34 AM, FreeRTOS Info <address@hidden
> <mailto:address@hidden>> wrote:
>
>     Hi,
>
>     If you look at the LPC1768 demos in the FreeRTOS download you will find
>     uIP demos, but the drivers are probably just as relevant to lwIP.
>
>     Regards,
>     Richard.
>
>     + http://www.FreeRTOS.org
>     Designed for Microcontrollers.  More than 7000 downloads per month.
>
>     + http://www.SafeRTOS.com
>     Certified by TÜV as meeting the requirements for safety related systems.
>
>
>
>     On 03/02/2011 19:09, Bernard Mentink wrote:
>     > Hi all,
>     >
>     > Does anyone have a port to this family of micros? I guess I am just
>     > wanting the eth_driver.c and eth_driver.h files ...
>     >
>     > Many Thanks,
>     > Bernie
>     >
>     > --
>     > You always have believers and scepticts.. A True inventor is always a
>     > believer..
>     >
>     >
>     >
>     > _______________________________________________
>     > lwip-users mailing list
>     > address@hidden <mailto:address@hidden>
>     > http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>     _______________________________________________
>     lwip-users mailing list
>     address@hidden <mailto:address@hidden>
>     http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
>
> --
> You always have believers and scepticts.. A True inventor is always a
> believer..
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users



--
You always have believers and scepticts.. A True inventor is always a believer..

reply via email to

[Prev in Thread] Current Thread [Next in Thread]