在自己设计的C6678板卡上只有PORT0连接phy芯片(port1没有连接),使用TI的K1_STK_V1.1的GE例程,port0的auto-negotiation状态一直为‘0’,auto-negotiation=0,link up=1,程序一直等待MR_AN_COMPLETE=1(1 = Auto-negotiation is completed)!而port1的状态正常,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和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的参考时钟为125MHz,在main()中进行如下修改,
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;
}
另外,已经验证DDR3工作正常。
Shine:
请问PHY是什么芯片?和EVM板一样吗?
na zhao:
回复 Shine:
88E1512,也是marvell的,EVM板用的是88E1111
Shine:
回复 na zhao:
请关注下面的帖子回复。
e2e.ti.com/…/843445