This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Port0 auto-negotiation failed

Genius 13655 points
Part Number: TMS320C6678

Hello Champs,

Customer designed his own C6678 board, he only connected PORT0 to PHY (Port1 is not connected to PHY), the status of PORT0 auto-negotiation is always "0", auto-negotiation=0,link up=1, the code is waiting for MR_AN_COMPLETE=1(1 = Auto-negotiation is completed). But Port1 is okay, link up=1,MR_AN_COMPLETE=1

/*2 Poll the SGMII_STATUS register to determine when autonegotiation is

complete without error. The AN_ERROR bit in the SGMII_STATUS register
will be set if the mode was commanded to be half-duplex gigabit.*/
while(0==(gpSGMII_regs[i]->STATUS_REG&CSL_CPSGMII_STATUS_REG_LOCK_MASK));
while(0==(gpSGMII_regs[i]->STATUS_REG&CSL_CPSGMII_STATUS_REG_LINK_MASK));
while(0==(gpSGMII_regs[i]->STATUS_REG&CSL_CPSGMII_STATUS_REG_MR_AN_COMPLETE_MASK));

DSP port0 is connected to PC:

1. ge_test.c

/*select between internal/external loopback test or test between two DSPs*/
GE_Test_Data_Path test_data_path= GE_TEST_DSP0_TO_DSP1;

/*select between 10/100/1000Mbps or auto negotiation mode*/
Ethernet_Mode ethernet_mode = ETHERNET_AUTO_NEGOTIAT_SLAVE ;

//The port connection state for the test
GE_Port_Connection port_connect[GE_NUM_ETHERNET_PORT]=
{
GE_PORT_CABLE_CONNECT , //SGMII port 0
GE_PORT_NO_CONNECT//SGMII port 1
};

/*use long long type (8 bytes) for MAC address, but only lower 6 bytes are valid.
Please note the byte order, MAC address byte 5 is in the lowest bits.
Each MAC address corresponding to a Ethernet port*/
unsigned long long Source_MAC_address[GE_NUM_ETHERNET_PORT]=
{
0x888888000001,
0x888888000002
};
unsigned long long Dest_MAC_address[GE_NUM_ETHERNET_PORT]=
{
0x4CCC6A31EDAF,
0x4CCC6A31EDAF
};//PC机的MAC地址

serdes clock is 125MHz

if(C6678_EVM==gDSP_board_type)
{
//DSP core speed: 100*10/1=1000MHz
KeyStone_main_PLL_init(100, 10, 1);
KeyStone_PASS_PLL_init(100, 21, 2);

//ge_cfg.serdes_cfg.commonSetup.inputRefClock_MHz = 312.5;

ge_cfg.serdes_cfg.commonSetup.inputRefClock_MHz = 125;
}

Besides, DDR3 is okay.

Thanks
Rgds
Shine