例程没改什么 用的是官方的开发板黄灯在闪
void SetPhyRmiiTiming( int num )
{
#ifdef PHY_RTL8201F
UART_printf( "Set RTL8201 PHY RMII Timimg\n" );
MiiStationWrite( num, 31, PHYAD, 7 ); //MIKE Chiang (For RTL8201F)
MiiStationWrite( num, 17, PHYAD, 0x12 ); //MIKE Chiang (For RTL8201F)
if ( MiiStationRead( num, 17, PHYAD ) != 0x12 )
{
UART_printf( "RTL8201 Setting Fail...\n" ); //MIKE Chiang (For RTL8201F)
}
MiiStationWrite( num, 31, PHYAD, 7 ); //MIKE Chiang (For RTL8201F)
MiiStationWrite( num, 19, PHYAD, 0x38 ); //MIKE Chiang (For RTL8201F)
if ( MiiStationRead( num, 19, PHYAD ) != 0x38 )
{
UART_printf( "RTL8201 Setting Fail...\n" ); //MIKE Chiang (For RTL8201F)
}
MiiStationWrite( num, 31, PHYAD, 7 ); //MIKE Chiang (For RTL8201F)
MiiStationWrite( num, 16, PHYAD, 0x79A ); //MIKE Chiang (For RTL8201F)
if ( MiiStationRead( num, 16, PHYAD ) != 0x79A )
{
UART_printf( "RTL8201 Setting Fail...\n" ); //MIKE Chiang (For RTL8201F)
}
#endif
}
|