EmbeddedRelated.com
Forums

TCPIP over ethernet on LPC2468

Started by ashu...@kanalsolutions.com July 15, 2009
Dear Chris and all the group members,

i am working on TCP/IP over ethernet in one of my project.
i am using LPC2468 (NXP ARM7) and the compiler is C ARM.
and the PHY DEVICE IS DP83848C.

i need your valuable advice in this regard...

i have initialised
EMAC
PHY

i need to know how do i send data to the server over TCP/IP.
what procedure i have to apply for this...

Regards

Tripathi

An Engineer's Guide to the LPC2100 Series

The book "TCP/IP Illustrated" has several volumes,
and each volume has 7~800 pages. It's not likely you
are going to write TCP/IP stack from scratch.

So, first, find an embedded TCP/IP stack for ARM MCU,
most of them are not free. NXP has a NicheLite
stack, it's free since it's a LITE version, the
full-version is not free if it doesn't meet your
requirement. Keil's RTL, FreeRTOS, Micrium's
network stack, you can google to find a dozen easily.
There is also an open-source uIP TCP/IP stack
integrated on many RTOSs.

Second, TCP/IP is only a transport layer protocol, to
send data, you need to add HTTP stack, both server
and client, for web communication; you can also add
socket layer and use socket protocol to send/receive data,
add/or add FTP protocol to send/receive files.
Tom

--- In l..., ashutosh@... wrote:
>
> Dear Chris and all the group members,
>
> i am working on TCP/IP over ethernet in one of my project.
> i am using LPC2468 (NXP ARM7) and the compiler is C ARM.
> and the PHY DEVICE IS DP83848C.
>
> i need your valuable advice in this regard...
>
> i have initialised
> EMAC
> PHY
>
> i need to know how do i send data to the server over TCP/IP.
> what procedure i have to apply for this...
>
> Regards
>
> Tripathi
>

Dear Members & Dezheng Tang,
thanks for your Advice but
i have downloaded source code for easyweb.c
easly available on the net.........
code implements Http web server..
in my project i have to send data through controller (LPC2468 having
Ethernet and i am using phy DP83848C )to the server over TCP/IP
and the server has some application based on the data send by the
controller section.

and i have a problem regarding access violation at RAM address
I have setted in options
my RAM address
Starting address 0x7ffe0000 and size is 4000
and i can write rx & tx descriptor function at this location
then why on debugging it shows access violtion...............

i have initialised
EMAC(send & recieve)
PHY(read & write)
the pseudo code is as follows

int main(void)
{
TCPLowLevelInit();

}

TCPlowlevelInit()//it is a timer0 init function and
{ // i initialise EMAC under it
//Timer0 routine
..........
......
//

EmacInit();
}

Timer0Isr();

what i ll have to do after this if i have to send data over TCPIP

i have declare structure IP structure to which i have to send data...

regards

Tripathi

> The book "TCP/IP Illustrated" has several volumes,
> and each volume has 7~800 pages. It's not likely you
> are going to write TCP/IP stack from scratch.
>
> So, first, find an embedded TCP/IP stack for ARM MCU,
> most of them are not free. NXP has a NicheLite
> stack, it's free since it's a LITE version, the
> full-version is not free if it doesn't meet your
> requirement. Keil's RTL, FreeRTOS, Micrium's
> network stack, you can google to find a dozen easily.
> There is also an open-source uIP TCP/IP stack
> integrated on many RTOSs.
>
> Second, TCP/IP is only a transport layer protocol, to
> send data, you need to add HTTP stack, both server
> and client, for web communication; you can also add
> socket layer and use socket protocol to send/receive data,
> add/or add FTP protocol to send/receive files.
> Tom
>
> --- In l..., ashutosh@... wrote:
>>
>> Dear Chris and all the group members,
>>
>> i am working on TCP/IP over ethernet in one of my project.
>> i am using LPC2468 (NXP ARM7) and the compiler is C ARM.
>> and the PHY DEVICE IS DP83848C.
>>
>> i need your valuable advice in this regard...
>>
>> i have initialised
>> EMAC
>> PHY
>>
>> i need to know how do i send data to the server over TCP/IP.
>> what procedure i have to apply for this...
>>
>> Regards
>>
>> Tripathi
>

---------------------------- Original Message ----------------------------
Subject: Re: [lpc2000] Re: TCPIP over ethernet on LPC2468
From: a...@kanalsolutions.com
Date: Thu, July 16, 2009 7:23 am
To: l...
"Dezheng Tang"
--

Dear Members & Dezheng Tang,
thanks for your Advice but
i have downloaded source code for easyweb.c
easly available on the net.........
code implements Http web server..
in my project i have to send data through controller (LPC2468 having
Ethernet and i am using phy DP83848C )to the server over TCP/IP
and the server has some application based on the data send by the
controller section.

and i have a problem regarding access violation at RAM address
I have setted in options
my RAM address
Starting address 0x7ffe0000 and size is 4000
and i can write rx & tx descriptor function at this location
then why on debugging it shows access violtion...............

i have initialised
EMAC(send & recieve)
PHY(read & write)
the pseudo code is as follows

int main(void)
{
TCPLowLevelInit();

}

TCPlowlevelInit()//it is a timer0 init function and
{ // i initialise EMAC under it
//Timer0 routine
..........
......
//

EmacInit();
}

Timer0Isr();

what i ll have to do after this if i have to send data over TCPIP

i have declare structure IP structure to which i have to send data...

regards

Tripathi

> The book "TCP/IP Illustrated" has several volumes,
> and each volume has 7~800 pages. It's not likely you
> are going to write TCP/IP stack from scratch.
>
> So, first, find an embedded TCP/IP stack for ARM MCU,
> most of them are not free. NXP has a NicheLite
> stack, it's free since it's a LITE version, the
> full-version is not free if it doesn't meet your
> requirement. Keil's RTL, FreeRTOS, Micrium's
> network stack, you can google to find a dozen easily.
> There is also an open-source uIP TCP/IP stack
> integrated on many RTOSs.
>
> Second, TCP/IP is only a transport layer protocol, to
> send data, you need to add HTTP stack, both server
> and client, for web communication; you can also add
> socket layer and use socket protocol to send/receive data,
> add/or add FTP protocol to send/receive files.
> Tom
>
> --- In l..., ashutosh@... wrote:
>>
>> Dear Chris and all the group members,
>>
>> i am working on TCP/IP over ethernet in one of my project.
>> i am using LPC2468 (NXP ARM7) and the compiler is C ARM.
>> and the PHY DEVICE IS DP83848C.
>>
>> i need your valuable advice in this regard...
>>
>> i have initialised
>> EMAC
>> PHY
>>
>> i need to know how do i send data to the server over TCP/IP.
>> what procedure i have to apply for this...
>>
>> Regards
>>
>> Tripathi
>



Tripathi,

Did u try using uIP package on LPC 2468? I have used uIP (
http://www.sics.se/~adam/uip/uip-1.0-refman/main.html) based web server on
LPC2468. u just need to change the timer part in the code as the code is
designed for unix machine. The sample program from uIP provides with a
beautiful example on web server.
even otherwise also u can refer this for your impementation.

-Harish.

On Wed, Jul 15, 2009 at 1:16 PM, wrote:

> Dear Chris and all the group members,
>
> i am working on TCP/IP over ethernet in one of my project.
> i am using LPC2468 (NXP ARM7) and the compiler is C ARM.
> and the PHY DEVICE IS DP83848C.
>
> i need your valuable advice in this regard...
>
> i have initialised
> EMAC
> PHY
>
> i need to know how do i send data to the server over TCP/IP.
> what procedure i have to apply for this...
>
> Regards
>
> Tripathi
>


You can use Keil's EasyWeb http server sample code. It consists of tcp protocol and if you want you can use it as a tcp client or server easyly. Of course you can apply udp protocolsimply.
regards

__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/