[En-Nut-Discussion] starting with RTL8019AS

Darek Berezowski darek.berezowski at gmail.com
Fri Apr 28 01:13:53 CEST 2006


Hi,

I'd like to ask if anybody has experience with connecting RTL8019AS to
ATMEGA 128 without memory mapping (external sdram)? I don't know if it is
possible?
I'm building my own system with Nut/OS but I can't find enough information
about the code and the initial settings.
It can be found function int NicInit(NUTDEVICE * dev) in the file "nicrtl.c"
where are initial operation but there is a note that "Applications should do
not directly call this function" because it is automatically executed with
function NutRegisterDevice.

In Nut/OS Configurator I chose:
 Ethernet Reset Port - AVRPORTE,
 Ethernet Reset Bit -4
 Ethernet Interrupt - INT6

Other control pins are connected to PORTE of the ATmega.
DATA_PORT --> PORTD
ADDRESS_PORT --> PORTA        But where I can set this ports as valid
settings for working system.

I wrote simple application:

#include <dev/nicrtl.h>
#include <arpa/inet.h>
#include "rtlregs.h"

static u_char mac[] = { 0x00,0x06,0x98,0x09,0x09,0x09 };

int main(void)
{
    int error =0;
    error = NutRegisterDevice(&DEV_ETHER, 0x10C0, 6);
    NutNetIfConfig("eth0", mac, inet_addr("192.168.0.2"),inet_addr("
255.255.255.0"));
    for (;;)     {};

return (0);
}

variable error =-1
As I found in documentation it can occur if the
NUTDEVICE<group__xgDevice.html#ga0>structure is invalid or if the
device initialization failed.

Does anybody have interesting ideas where I can find solution? I'd be very
greatfull.

Dark



More information about the En-Nut-Discussion mailing list