Hello, all,
A problem troubled me for a long time, I designed a board based on 6678EVM, and also use 88E1111 as the PHY. I tested the demo GE, MAC, SGMII, and SERDES loopback are passed successfully. I connected the board with PC via copper, the LED_LINK1000 is lighting on, and the LED_RX is blinking. Then I test the platform with the following code:
CSL_BootCfgUnlockKicker();
CSL_BootCfgSetSGMIIConfigPLL (0x00000041);
platform_delaycycles(100);
CSL_BootCfgSetSGMIIRxConfig (1, 0x00700621);
CSL_BootCfgSetSGMIITxConfig (1, 0x000108A1);
do
{
CSL_SGMII_getStatus(1, &sgmii_status);
} while (sgmii_status.bIsLocked != 1);
CSL_SGMII_startRxTxSoftReset (1);
CSL_SGMII_disableMasterMode (1);
CSL_SGMII_enableAutoNegotiation (1);
CSL_SGMII_endRxTxSoftReset (1);
/* Setup the Advertised Ability register for this port:
* (1) Enable Full duplex mode
* (2) Enable Auto Negotiation
* (3) Enable the Link
*/
sgmiiCfg.linkSpeed = CSL_SGMII_1000_MBPS;
sgmiiCfg.duplexMode = CSL_SGMII_FULL_DUPLEX;
CSL_SGMII_setAdvAbility (1, &sgmiiCfg);
do
{
CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);
} while (sgmiiStatus.bIsLinkUp != 1);//////////////////////////////////////////////////////////////////////////////////////////////In my project, it is running in infinite loop here
/* Wait for SGMII Autonegotiation to complete without error */
do
{
CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);
if (sgmiiStatus.bIsAutoNegError != 0)
return; /* This is an error condition */
} while (sgmiiStatus.bIsAutoNegComplete != 1);
I know the sgmii is not link up, but I don't know what causes this, can you give me some guidance and advice? Thank you!!!!!!!