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.

TMS320C6678: How to modify code in Init_cpsw() ?

Part Number: TMS320C6678


Hi 

      I  am using a custom 6678 board. I want to do eth communciation between DSP and PC.

      

this is my design.

Int32 Init_Cpsw (Void)
{                      
    Uint32       macPortNum, mtu = 1518;

    Uint8        macSrcAddress[6] =  {0x00, 0x17, 0xE4, 0x00, 0x01, 0x00};
    Uint8        PCmacAddress [6] = {0x40, 0x8D, 0x5C, 0xB7, 0xB4, 0x17};  /* MAC address for (EMAC1) Port 1 */
	/* Initialize the SERDES modules */
	Init_SGMII_SERDES();

    /* Initialize the SGMII/Sliver submodules for the   corresponding MAC  ports0. */
	//TJ:only init  SGMII0
	macPortNum = 0;
    if (Init_SGMII (macPortNum))
    {
    	System_printf ("port %d SGMII init succeed \n",macPortNum);
		return -1;
    }
    Init_MAC (macPortNum, macSrcAddress, mtu);
    System_printf ("port %d MAC init succeed \n",macPortNum);

    System_printf ("MAC init succeed \n");
    /* Setup the Phys by initializing the MDIO */
    Init_MDIO ();
    System_printf ("MDIO init succeed \n");
    /* Setup the Ethernet switch finally. */
    Init_Switch (mtu);
    

    Switch_update_addr(0, macSrcAddress, 0);

    System_printf ("switch port 0 init succeed \n");
    Switch_update_addr(1, macSrcAddress, 0);
    System_printf ("switch port 1 init succeed \n");
    //Switch_update_addr(2, macAddress2, 0);
    //System_printf ("switch port 2 init succeed \n");
    /* CPSW subsystem setup done. Return success */
    return 0;    
}

this is my code .

now I  can  use DSP send 100 packet to PC,and PC receive 100 packet.

but DSP can not  receive packet from PC.

I dont kown  how to set  Gbe switch MAC and how to set ALE.

please check my code and help me out .