Tool/software: Code Composer Studio
hi
i'm newbie
i want to set SGMII(1) config to forced 100 mbps half-duplex mode
so, now i'm trying to config and check sgmii(1) linkspeed in C6678 EVM board
but always performs auto-negotiation.....
how can i configure to SGMII(1) forced 100 mbps half-duplex fixed mode???
memory browser is below
pc side is below
i read below in sprugv9d
my code is below...
void Init_SGMII (uint32_t macPortNum)
{
CSL_SGMII_ADVABILITY sgmiiCfg;
CSL_SGMII_STATUS sgmiiStatus;
uint32_t txConfig;
/* Reset the port before configuring it */
CSL_SGMII_doSoftReset (macPortNum);
while (CSL_SGMII_getSoftResetStatus (macPortNum) != 0);
if (macPortNum == 1) {
// forced 100 mbps half duplexmode
CSL_SGMII_startRxTxSoftReset (macPortNum);
CSL_SGMII_enableMasterMode (macPortNum);
//CSL_SGMII_disableMasterMode (macPortNum);
CSL_SGMII_disableAutoNegotiation (macPortNum);
//CSL_SGMII_enableAutoNegotiation (macPortNum);
CSL_SGMII_endRxTxSoftReset (macPortNum);
/* 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_100_MBPS;
sgmiiCfg.duplexMode = CSL_SGMII_HALF_DUPLEX;
sgmiiCfg.bLinkUp = 1;
CSL_SGMII_setAdvAbility (macPortNum, &sgmiiCfg);
do
{
CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);
printf("bIsLinkup:%d\n",sgmiiStatus.bIsLinkUp);
} while (sgmiiStatus.bIsLinkUp != 1);
/* Reset MAC Sliver 0 */
CSL_CPGMAC_SL_resetMac (macPortNum);
while (CSL_CPGMAC_SL_isMACResetDone (macPortNum) != TRUE);
CSL_CPGMAC_SL_enableExtControl (macPortNum);
#endif // forced link mode
}
/* All done with configuration. Return Now. */
return;
}