Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RTL8019AS

0 views
Skip to first unread message

daan...@my-deja.com

unread,
Dec 22, 2000, 8:02:54 AM12/22/00
to
Hello,

I am trying to connect a PC ISA ethernet card to my H8/3048F evaluation
board. I am trying to get it running using a eight bit databus. Unfortunately
this does not work. When I try to switch the registerpage (using the CR) to
another page then page 0 the chip does not seem to respond. When using the
debuggers dump window and changing the CR manually to say page 1, the
RTL8019AS switches to page 1 and switches back immediately. The debuggers
window continually reads all registers (0x00 upto 0x1F). Can this be the
cause of this behaviour? If yes how can I check whether the chip respods
okay?

When I let software initialise the chip and let it check the CURR and BNDY
registers it detects that a packet has arrived (CURR!=BNDY). When it tries to
read the packet, using the send DMA method, it only receives 0x0E bytes from
the chip.

I have been surfing the net for datasheets, application notes and sample
source code. I found some sourcecode for NE2000-compatible chips. The first
thing that caught my attention is that all initialisation routines in the
sample sources are different. Does anybody know the correct initialisation
procedure for the Realtek RTL8019AS?

Hope someone can help me.


Best regards,

Daan


Sent via Deja.com
http://www.deja.com/

Søren A.Møller

unread,
Dec 22, 2000, 11:03:13 AM12/22/00
to
In article <91vjds$4jf$1...@nnrp1.deja.com>, daan...@my-deja.com says...

I am pretty sure it is 100% NE2000 compatible - at least all the NE2000
drivers (Win95, WinNT, Linux, Crynwr packet) I have tried worked with it.
I have used both Crynwr ( http://www.crynwr.com ) NE2000 packet driver
and uClinux ne2000 driver with the RTL8019AS in 8 bit mode in embedded
systems.
Both needed some minor changes to work with 8 bit interface.
There are a couple of bits in the NE2000 registers which set the
endianess and bus width.

Merry Christmas
Søren A.Møller

jk

unread,
Dec 22, 2000, 12:18:54 PM12/22/00
to
daan...@my-deja.com wrote:
> --clip--

> I have been surfing the net for datasheets, application notes and sample
> source code. I found some sourcecode for NE2000-compatible chips. The first
> thing that caught my attention is that all initialisation routines in the
> sample sources are different. Does anybody know the correct initialisation
> procedure for the Realtek RTL8019AS?
> --clip--
>

Example driver: FreeBSD i386/boot/netboot/ns8390.c

http://www.cs.duke.edu/ari/FreeBSD-kernel/HTML/S/i386%20boot%20netboot%20ns8390.c.html

I have used this driver with few modifications in my test projects:
RTL8019AS + PIC16F877 and RTL8019AS + SH7045F

jk

Jeremy Bentham

unread,
Dec 22, 2000, 1:36:57 PM12/22/00
to

It's worth reading the original NatSemi 8390 Network Interface
Controller data sheets and application notes; they give a lot of clues
as to how the NIC code _should_ work. The RTL8019AS seems to be a
good-quality NE2000 clone; the areas to watch are:

1. The RTL part can boot up in several different modes, depending on the
non-volatile configuration. If using a standard ISA card, put it into a
PC and run the RealTek setup software to check what mode it is in (e.g.
not plug-and-play!)

2. If you can, check your microcontroller 'C' code by running it on a PC
first. Check it under high-load (and excessive-load) conditions - it's
quite hard to ensure these are handled correctly.

3. There are both hardware and software settings for 8/16 bit operation;
it is important that you use 16-bit 'remote DMA' accesses if the
hardware line is set to 16-bit operation, and vice-versa.

4. Take care if you're not using interrupts; there seems to be a
critical time (just after initiating a transmission) when the NIC is
best left alone, and an incautious polling cycle can disrupt it.

5. Depending on your CPU speed, you may need some wait-state handling
(IOCHRDY) to avoid clashes between the external CPU cycles and the
internal DMA. The NIC will occasionally need to delay the external cycle
if it coincides with an internal one.

6. If you can spare $40, take a look at ETHERNE.C supplied with my book
'TCP/IP Lean' - no license needed for non-commercial use.

Jeremy Bentham

Patrick Klos

unread,
Dec 26, 2000, 10:14:40 AM12/26/00
to
In article <91vjds$4jf$1...@nnrp1.deja.com>, <daan...@my-deja.com> wrote:
>I am trying to connect a PC ISA ethernet card to my H8/3048F evaluation
>board. I am trying to get it running using a eight bit databus. Unfortunately
>this does not work. When I try to switch the registerpage (using the CR) to
>another page then page 0 the chip does not seem to respond. When using the
>debuggers dump window and changing the CR manually to say page 1, the
>RTL8019AS switches to page 1 and switches back immediately.

How have you implemented the ISA (8-bit) bus between the card and your H8?
I would guess your hold times for the data bits isn't long enough for the
chip, but that's just a guess.

>The debuggers
>window continually reads all registers (0x00 upto 0x1F). Can this be the
>cause of this behaviour? If yes how can I check whether the chip respods
>okay?

Reading the registers will not cause the page selection to change (back to
zero). This doesn't sound like your problem to me.

>When I let software initialise the chip and let it check the CURR and BNDY
>registers it detects that a packet has arrived (CURR!=BNDY). When it tries to
>read the packet, using the send DMA method, it only receives 0x0E bytes from
>the chip.

How many is it supposed to read? (i.e. how big is the packet you're trying
to read?) Have you programmed the chip for a byte-wide bus?

>I have been surfing the net for datasheets, application notes and sample
>source code. I found some sourcecode for NE2000-compatible chips. The first
>thing that caught my attention is that all initialisation routines in the
>sample sources are different. Does anybody know the correct initialisation
>procedure for the Realtek RTL8019AS?

There's nothing to say they can't all be right. I'm sure the basic
sequence is pretty similar in most init routines. Besides, until you
can reliably select page 1 and read/write registers in it, I wouldn't
worry too much about other stuff.
============================================================================
Patrick Klos Email: pat...@klos.com
Klos Technologies, Inc. Web: http://www.klos.com/
============================================================================

0 new messages