Part Number:TMS320C6678
板子是自制板,电路参考的是官方的C6678 EVM ,SGMII1连接88E1111,程序使用的是K1_STK_v1.1中的GE,想实现DSP SGMII1与PC间的连接测试。
程序修改参考了blog.csdn.net/…/87882551
GE_Test.c 模式配置如下:
GE_Test_Data_Path test_data_path= GE_TEST_DSP0_TO_DSP1;
Ethernet_Mode ethernet_mode = ETHERNET_AUTO_NEGOTIAT_SLAVE;
GE_Port_Connection port_connect[GE_NUM_ETHERNET_PORT]=
{
GE_PORT_NO_CONNECT, //SGMII port 0
GE_PORT_CABLE_CONNECT //SGMII port 1
};
Dest_MAC_address已修改为PC有线网的MAC
GE_2DSP_Test.c 模式配置如下:
/*payloadNumBytes, dataPattern, numPackets*/
{46, 0x12, 4}, /*SGMII port0*/
// {1500, 0x55, 2}, /*SGMII port0*/
{46, 0x01, 32} /*SGMII port1*/
};
程序运行时,会一直陷入循环显示:Wait for port 1 PHY link…
将void Wait_PHY_link()中的while(0==(gpMDIO_regs->LINK_REG&(1<<i)))修改为while(1==(gpMDIO_regs->LINK_REG&(1<<i)))后可以跳出循环,但是会出现link PHY1 is NOT up
详细打印如下所示:
JTAG ID= 0x1009e02f. This is C6678/TCI6608 device, version variant = 1.
DEVSTAT= 0x00000201. little endian, No boot or EMIF16(NOR FLASH) or UART boot, PLL configuration implies the input clock for core is 50MHz.
SmartReflex VID= 59, required core voltage= 1.078V.
Die ID= 0x18008009, 0x040467a7, 0x00000000, 0x78da0021
Device speed grade = 1000MHz.
Enable Exception handling…
DSP board type is C6678_EVM!
GE auto negotiation (slave) two DSPs test (DSP0 -> DSP1)…
Unconnected SGMII0 port can only be used for internal loopback test
link PHY1 is NOT up
Transferred 0 bytes with 191 cycles, throughput= 0Mbps.
SGMII1 Link Partner Advertised Ability 100Mbps Full Duplex
SGMII port 1 GIG input signal from SGMII is low.
MDIO ALIVE flag: 0x00000000
MDIO LINK flag: 0x00000000
GE test complete.
想请教一下各位前辈、各位大佬
1.出现link PHY1 is NOT up这种情况怎么办?是否说明DSP与PHY没有连通?
2.SGMII1 Link Partner Advertised Ability 100Mbps Full Duplex 是否证明PHY已经完成了自协商?
3.以上2点似乎存在矛盾,哪一个才是对的?
4.如果DSP与PHY连通,PHY与PC端完成自协商,我在PC端如何知道PC与DSP已经连通,速率是多少?
Shine:
请问自环测试都通过了吗?
,
XIA LIU:
MAC、SGMII、Serdes回环测试都没有问题
,
Shine:
STK里并不包含以太网协议栈,没有TCP/IP或者UDP协议的支持。如果要使用以太网协议的话,建议使用NDK。https://www.ti.com/lit/an/sprac57/sprac57.pdf