[En-Nut-Discussion] [PATCH] Minor fixes: httpserv and TCP debugging

Harald Kipp harald.kipp at egnite.de
Fri Apr 20 12:01:26 CEST 2007


Marti,
> I have been testing Nut/OS 4.3.2 beta on an AT91SAM7X evaluation board 
> and I am incredibly pleased with it, thanks for a great embedded OS!
>
> I had some problems with the latest change to the at91_emac.c driver, 
> and it works after rolling back. We will be investigating this further.
>   
The fix had been provided by Atmel after Nut/OS fails to run on a new 
production of AT91SAM9260 evaluation kits. As far as I understood, some 
resistor tolerances let the PHY initialization fail. They further told 
me, that this may also apply to the SAM7X Kit.

Can you please try to change the PHY address to zero

  #define NIC_PHY_ADDR            0

and switch off all pull-ups during PHY reset

    /* Disable TESTMODE and set PHY address 0 and by disabling pull-ups. */
#ifdef PHY_MODE_RMII
    outr(EMAC_PIO_PUDR, _BV(PHY_RXDV_TESTMODE_BIT) |
        _BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT)
        | _BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) | 
_BV(PHY_CRS_AD4_BIT));
#else
    /* Additionally disable RMII, if not configured. */
    outr(EMAC_PIO_PUDR, _BV(PHY_COL_RMII_BIT) | _BV(PHY_RXDV_TESTMODE_BIT) |
        _BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT) |
        _BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) | 
_BV(PHY_CRS_AD4_BIT));
    outr(EMAC_PIO_PUDR, _BV(PHY_COL_RMII_BIT) | _BV(PHY_RXDV_TESTMODE_BIT));
#endif

...

    /* Re-enable pull-ups. */
#ifdef PHY_MODE_RMII
    outr(EMAC_PIO_PUER, _BV(PHY_RXDV_TESTMODE_BIT) |
        _BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT)
        | _BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) | 
_BV(PHY_CRS_AD4_BIT));
#else
    outr(EMAC_PIO_PUER, _BV(PHY_RXDV_TESTMODE_BIT) |
        _BV(PHY_RXD0_AD0_BIT) | _BV(PHY_RXD1_AD1_BIT)
        | _BV(PHY_RXD2_AD2_BIT) | _BV(PHY_RXD3_AD3_BIT) | 
_BV(PHY_CRS_AD4_BIT));
#endif

Many thanks for the nice words about Nut/OS and the other patches.

Harald




More information about the En-Nut-Discussion mailing list