[En-Nut-Discussion] How to make "Ethernut Device registration" more save??

Ács Péter acspeter at rubin.hu
Fri Aug 13 10:41:04 CEST 2010


On 2010-08-13 08:06, Dominik Schröder wrote:
> Where do I have to insert the NutSleep?

In our case, the problematic part was this:

         while (--tmo) {
             if (phy_inw(NIC_PHY_BMSR) & NIC_PHY_BMSR_ANCOMPL) {
                 break;
             }
         }

It took so long, that the internal watchdog restarted the processor. If 
you modify it like this:

         while (--tmo) {
             if (phy_inw(NIC_PHY_BMSR) & NIC_PHY_BMSR_ANCOMPL) {
                 break;
             }
             NutSleep(10);
         }

it should work (or maybe with a longer sleep).

-- 
best regards,

Peter




More information about the En-Nut-Discussion mailing list