same issue here WINCE6 i.mx28 + lan8720. Why "10 Base-T" not supported in Adeneo BSP ? Can any one try check 10mbit + Linux BSP?
we need detect Speed and Duplex at ENETEnetInit()
like in this sample code:
Sleep(200); | |||
RegValue = MII_READ_COMMAND(MII_LAN87xx_SCSR); | |||
RegValue |= BF_ENET_MAC_MMFR_PA(index); | |||
HW_ENET_MAC_MMFR_WR(MAC0,RegValue); | |||
Sleep(200); | |||
MIIReg = HW_ENET_MAC_MMFR_RD(MAC0); | |||
RETAILMSG(1, (TEXT("ENET: index = %d RegValue = %x MII_LAN87xx_SCSR MIIReg= %x \r\n"),index,RegValue,MIIReg)); |
if(MIIReg & (0x1000)) | |
{ |
DEBUGMSG(ZONE_FUNCTION, (TEXT("ENET: STATUS: Auto-Negotiation complite at init \r\n")));
}
HcdSpeed=(((UINT16)MIIReg & 0x001C)>>2); | |
if(1==HcdSpeed) | |
{ |
BW_ENET_MAC_RCR_RMII_10T(index, 1); // eai set 10-Base T Enables 10Mbps mode of the RMII.
BW_ENET_MAC_RCR_DRT(index, 1); //eai Disable reception of frames while transmitting (normally used for half duplex mode)
BW_ENET_MAC_TCR_FEDN(index,0); //eai full duplex disabled
DEBUGMSG(ZONE_FUNCTION, (TEXT("PHY_STAT_10HDX at init \r\n")));
} | |
else if(5==HcdSpeed) |
{ |
BW_ENET_MAC_RCR_RMII_10T(index, 1); // eai set 10-Base T Enables 10Mbps mode of the RMII.
BW_ENET_MAC_RCR_DRT(index, 0); //eai en reception of frames while transmitting
BW_ENET_MAC_TCR_FEDN(index,1); //eai full duplex en
DEBUGMSG(ZONE_FUNCTION, (TEXT("PHY_STAT_10FDX at init \r\n")));
} |
else if(2==HcdSpeed) | |
{ |
BW_ENET_MAC_RCR_RMII_10T(index, 0); // eai set 100-Base T
BW_ENET_MAC_RCR_DRT(index, 1); //eai Disable reception of frames while transmitting (normally used for half duplex mode)
BW_ENET_MAC_TCR_FEDN(index,0); //eai full duplex disabled
DEBUGMSG(ZONE_FUNCTION, (TEXT("PHY_STAT_100HDX at init \r\n")));
} |
else if(6==HcdSpeed) | |
{ |
BW_ENET_MAC_RCR_RMII_10T(index, 0); // eai set 100-Base T Enables 10Mbps mode of the RMII.
BW_ENET_MAC_RCR_DRT(index, 0); //eai en reception of frames while transmitting
BW_ENET_MAC_TCR_FEDN(index,1); //eai full duplex en
DEBUGMSG(ZONE_FUNCTION, (TEXT("PHY_STAT_100FDX at init \r\n")));
} |