lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] cs8900 stall


From: Chris Hiszpanski
Subject: Re: [lwip-users] cs8900 stall
Date: Sat, 17 Sep 2005 17:23:11 -0400

I found and fixed the problem.

My interrupt handler called cs8900if_service whenever the cs8900 asserted the interrupt. However, it did not set the needs_servicing = 1. Therefore, cs8900if_service returned without servicing the interrupt, causing the processor to continuously attempt to service the interrupt.

There was another problem. cs8900_service only services one ISQ event since events2service = 1. However, all ISQ events must be processed according to the cs8900 documentation.

Thinking it over, the driver should work if the interrupt handler first firsts the needs_servicing flag and then calls cs8900if_service. If two ISQ events were to arrive, the first would be processed, then the interrupt handler would be called again and the second one would be processed. This is not what happened on my system. I'm not sure why.

Cheers,
Chris


Hi Peter,

Are you refering to the issue where the cs8900 will eventually miss an interrupt if it is in 8-bit mode? This is not a problem for me since I have my hardware configured for 16-bit accesses.

I also found a possible cause in the Cirrus Logic an205-2 application note for the cs8900. Apparently, before skipping a frame, RxLength and RxStatus must be read, which the driver does not seem to do. Adding these changes to the driver did not fix the problem however. I added:

PACKETPP = RXSTATUS;
temp = PPDATA;
PACKETPP = RXLEN;
temp = PPDATA;

before every Skip_1 (four places in the file).

One more thing I noticed. In cs8900if_init, I had cs8900if->use_polling = 1;. I changed this to 0, but this only made matters worse. With that change, all pings to the board failed. In fact, the interrupt line is never driven high.

Cheers,
Chris

Essentially, if the cs8900 receives an addition packet while a packet is waiting to be processed by an interrupt handler, the cs8900 stalls.

Is anyone else experiencing this problem?

I don't know if it's _this_ problem, but I remember several years ago the CS8900 had a hardware problem concerning lost interrupts, and I had to add polling to keep it alive. (Not under lwIP though.)

Maybe check the chip errata, wether this problem still exists.

All the best
Peter

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/





reply via email to

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