My board has 3 C6678 DSPs. Each DSP has SGMII-0 connection to an Ethernet switch (SGMII to SGMII). The links are up, however, when I run my code (ported from helloworld project), after DHCP client is running, the DSP is unable to communicate with external DHCP server.
I'm using MCSDK 2_00_08_20, and PDK C6678_1_0_0_20
[C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0] PASS successfully initialized
[C66xx_0] Ethernet subsystem successfully initialized
[C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
[C66xx_0] Registration of the EMAC Successful, waiting for link up ..
[C66xx_0] Service Status: DHCPC : Enabled : : 000
[C66xx_0] Service Status: DHCPC : Enabled : Running : 000
[C66xx_0] Service Status: DHCPC : Enabled : Fault : 002
First I have a question, in helloworld.c, in the following code, which interface I should use, 0 or 1? I want to use SGMII-0. But if I change dhcpc.cisargs.lfIdx = 0, then above code will end up with NIMUIOCTL error code -22. So currently I'm setting it as 1.
// Else we specify DHCP
else {
CI_SERVICE_DHCPC dhcpc;
// Specify DHCP Service on IF-1
bzero( &dhcpc, sizeof(dhcpc) );
dhcpc.cisargs.Mode = CIS_FLG_IFIDXVALID;
dhcpc.cisargs.IfIdx = 1;
dhcpc.cisargs.pCbSrv = &ServiceReport;
CfgAddEntry( hCfg, CFGTAG_SERVICE, CFGITEM_SERVICE_DHCPCLIENT, 0, sizeof(dhcpc), (UINT8 *)&dhcpc, 0 );
}
When I look into the Gigabit Ethernet Switch sub system's statistic memory (0x209_0B00), I can see:
1. The switch port 0 is receving packets and transmit packets. The switch port 0 is the host port, not the SGMII-0.
2. The switch port 1 (the SGMII-0 port) is receiving packets, but not transmit packets. The Carrier Sense Error register reports Carrier Senser Error. The link is duplex.
0x209_0b00: 0000004c - PORT 0 (host port) receiving frames
0x209_0b34: 00033f7d - PORT 0 (host port) transmit frames
0x209_0c00: 000343cb - PORT 1 (SGMII-0) receiving frames
0x209_0c34: 00000000 - PORT 1 (SGMII-0) transmit frames, it is not transmitting
0x209_0c60: 000b129 - PORT 1 (SGMII-0) carrier sensor error register
Any idea?
Thank you for your help.
Chao