[En-Nut-Discussion] ARM: NutRegisterDevice fail for the ethernet [was (no subject)]

Thiago A. Corrêa thiago.correa at gmail.com
Mon Nov 24 15:55:08 CET 2008


Well, I guess you should then look for the reasons int
EmacInit(NUTDEVICE * dev) in ethernut\nut\arch\arm\dev\at91_emac.c
returns -1. Most probable is the EmacReset(EMAC_LINK_LOOPS).

EmacReset for instance checks the PHY ID's, so if you are using
something different than those 3 options it would fail.
Also, it returns -1 if the link speed negociation fails. You might
want to try connecting the board to different switches/hubs/routers.
It's unusual, but I've heard crazy stories of devices that doesn't
behave correctly in the auto negociation.
That's it, the 2 most critical return -1 I've found. It also does
return -1 if the NutThreadCreate or NutRegisterIrqHandler fails, which
is unusual.

It might be helpfull for your debugging if you change some of those
values to -2, -3, etc... to trace the exact cause.

Sorry I can't be of more assistance.

Kind Regards,
    Thiago A. Correa

On Mon, Nov 24, 2008 at 10:42 AM, Rasmus Aagesen
<rasmus.aagesen at tonica.dk> wrote:
> Hallo Thiago.
>
> We have connected the cable and there are connection to the local net via
> this cable.
>
> We have copied all files to the other PC so the code and files are
> identically width the working pc's, we are also using the same kit.
>
> Best Regard,
>
> Rasmus.
>
> -----Oprindelig meddelelse-----
> Fra: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] På vegne af Thiago A. Corrêa
> Sendt: 21. november 2008 17:00
> Til: Ethernut User Chat (English)
> Emne: Re: [En-Nut-Discussion] (no subject)
>
> Hi,
>
>   Welcome to ethernut :)
>
>   I don't use arm, so I'm not sure, but I do remember a discussion
> not long ago on the list saying that the NutRegisterDevice on arms
> were failing if the cable were disconnected.
>
>    Hope this helps a bit.
>
> Kind Regards,
>    Thiago A. Correa
>
> On 11/21/08, Rasmus Aagesen <rasmus.aagesen at tonica.dk> wrote:
>>  Hallo Harald.
>>
>>
>>
>>  My name is Rasmus, I am from a small Company called Tonica.
>>
>>
>>
>>  You have be mailing white Lasse Conrad about Nut/Os Ethernut , Lasse have
>>  left the company, so I am currently on this topic.
>>
>>
>>
>>  We are using AT91SAM9260-EK developing kit, and we Communicate via
> Ethernet.
>>
>>
>>
>>  To communicate  via  Ethernet we use the EtherNut core.
>>
>>  We have the communication up and running on one pc, we how ever have a
>>  problem, getting the Ethernet communication to work on a different pc
> width
>>  an identically application.
>>
>>
>>
>>  In our code the function.
>>
>>
>>
>>  NutRegisterDevice(&DEV_ETHER, 0x8300, 5);
>>
>>
>>
>>  Is returning -1.
>>
>>
>>
>>  We can't seem to find the problem Hopping you could help.
>>
>>
>>
>>  Best Regard
>>
>>
>>
>>  Rasmus.
>>
>>  _______________________________________________
>>  http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>


More information about the En-Nut-Discussion mailing list