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: 6678网口1测试正常,但是网口0却初始化过不去。

Part Number: TMS320C6678


测试环境:phy芯片是88E1111,dsp的SGMII 0和1都 与phy链接,时钟250MHz。

软件上,serdes的时钟配置为0x00000051;这个也没问题。

结果:网口 0 初始化会卡在CSL_SGMII_setAdvAbility (macPortNum, &sgmiiCfg);函数中的最后一步,一直不往下运行。 网口 1 能顺利初始化通过。

if (macPortNum == 1) {

        /* Hold the port in soft reset and set up

         * the SGMII control register:

         *      (1) Disable Master Mode

         *      (2) Enable Auto-negotiation

         */

        CSL_SGMII_startRxTxSoftReset (macPortNum);

        CSL_SGMII_disableMasterMode (macPortNum);

        CSL_SGMII_enableAutoNegotiation (macPortNum);

        CSL_SGMII_endRxTxSoftReset (macPortNum);

 

        /* Setup the Advertised Ability register for this port:

         *      (1) Enable Full duplex mode

         *      (2) Enable Auto Negotiation

         *      (3) Enable the Link

         */

        sgmiiCfg.linkSpeed      =   CSL_SGMII_1000_MBPS;

        sgmiiCfg.duplexMode     =   CSL_SGMII_FULL_DUPLEX;

        CSL_SGMII_setAdvAbility (macPortNum, &sgmiiCfg);

 

        do

        {

            CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);

        } while (sgmiiStatus.bIsLinkUp != 1);

 

        /* Wait for SGMII Autonegotiation to complete without error */

        do

        {

            CSL_SGMII_getStatus(macPortNum, &sgmiiStatus);

            if (sgmiiStatus.bIsAutoNegError != 0)

                return; /* This is an error condition */

        } while (sgmiiStatus.bIsAutoNegComplete != 1);

    }

网口0和网口1的区别就是,网口1是集成在板卡内的,网口0是测试小板上的。

代码上也改动了,就只需要这里 1 改为 0 。

奇怪的是两个网口用的是同一个时钟,为啥网口1 可以初始化过去,网口 0 却卡在这里。