lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] eZ80 port


From: Robert
Subject: [lwip-users] Re: [lwip] eZ80 port
Date: Wed, 08 Jan 2003 23:53:20 -0000

On Mon, 9 Dec 2002, Robert wrote:
> I have had some success porting LwIP over to the eZ80.  Some of the issues
> are related to the current Zilog compiler.  The changes so far related to
> that are shown below.  I would appreciate any comments or suggestions.  
> My current status is that the arp table on the eZ80 is being built, and
> other hosts receive the arp of the eZ80.  So, I believe I am able to both
> receive and send packets over Ethernet now.  I am not able to make a 
> connection however, my callback "accept" function is never being called.  

I was able to find my problem with the "accept" never being called.  Turns 
out I was loading the MAC address into the chip backwards, so many of the 
packets were being discarded by the chip itself.  So after fixing that and 
a bit more cleanup on the CS8900 driver, I can now make connections.  I 
have the echo.c demo program worklng.

A few notes about the porting.....The eZ80 is an 8 bit CPU, so byte
alignment is the native mode.  Interfacing with the CS8900 chip in the 8
bit mode is a bit tricky it turns out. The chip is interfaced in the I/O
mode.  All registers in the chip are 16 bits, so you are reading the LOW
byte & the HIGH byte from the chip as seperate transfers.  It turns out
the order of reading the two bytes matters and is different for different
registers.  Also interrupts are not supported in the 8 bit mode
(apparently they sort of work, but are not reliable in heavy traffic
conditions), so polling has to be done. Fortunately there is both an App
note and a sample driver on the Crystal web site.  Combining the latter
and Leon's 16 bit driver, I was able to put together working code.

I have a question about the ARP table.  I never see the "ctime" variable 
with any value other than zero.  I assumed that this variable was being 
used to age the ARP table entries.  Can anyone comment on this?

-- 
Best Regards,
Robert Laughlin


[This message was sent through the lwip discussion list.]




reply via email to

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