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.

AM5728: Why Gmac diag test fails under gigabit ethernet speed?

Part Number: AM5728


Hello,

I have evm AM5728 board and ccs v8.1 and sdk rtos v5.01 installed on my PC. I was able to run gmac diag test successfully for 10 and 100 Mbit speeds. What I want to ask is that when I searched in the gmac_test.c source file I saw below speed change code part:

//change speed
if(speed==SPEED_LB)
{
speed=SPEED_10H;
if(phy_type==PHY_MICREL_KSZ9031RNX) //10H is failing now
speed=SPEED_10F;
}
else if(speed==SPEED_10H)
{
speed=SPEED_10F;
}
else if(speed==SPEED_10F)
{
speed=SPEED_100H;
}
else if(speed==SPEED_100H)
speed=SPEED_100F;
else if(speed==SPEED_100F)
{
if(fGig && (phy_type!=PHY_MICREL_KSZ9031RNX))
speed=SPEED_1000F;
else
fDone=TRUE;
}
else if(speed==SPEED_1000F)
fDone=TRUE;

this code implies that if the phy that is used in the evm AM5728 board is MICREL_KSZ9031RNX, than 1000 Mbit ethernet is not be supported. But I looked for the  MICREL_KSZ9031RNX datasheet and this phy supports gigabit ethernet and also I found from evmAM572x Hardware user's guide(spruig1.pdf) from part 6.4:

6.4 10/100/1000 Ethernet
The AM572x GP EVM has two 10/100/1000 Ethernet transceiver from Micrel(KSZ9031RN) that is
connected to a dual RJ45 (P5) connector. The two Ethernet interfaces are connected to the switch inside
the AM572x processor.
The reset on the transceivers are driven by the board system reset signal ENET0/1_PORZ. A 25MHz
crystal drives the clock input of the KSZ9031RN Ethernet PHY.
The PHY address on the MDIO bus is set to 0x00h.

In the evmAM5728, MICREL_KSZ9031RNX phy exists and it supports gigabit ethernet. I thought that above "change speed" code is miswritten and I changed if(fGig && (phy_type!=PHY_MICREL_KSZ9031RNX)) line with if(fGig && (phy_type ==PHY_MICREL_KSZ9031RNX)) line and I ran the test. I also created two ethernet looper for gigabit ethernet for each port of evm AM5728 board. I have connected (shorted) 1(TX+) and 3(RX+) together; 2(TX-) and 6(RX-) together; 4(BI+) and 7(BI+) together; 5(BI-) and 8(BI-) together for this purpose.

But when speed changed to 1000F, test fails with "link down" error. The other speeds passed the test.

I have continued searching for the problem. I found

/* errata i880 "Ethernet RGMII2 Limited to 10/100 Mbps" */
&phy1 {
	max-speed = <100>;

  from the AM57xx_beagle_x15.dts file from sdk linux files. But there is no mention about speed limit in the evmAM5728 dts file. I downloaded and installed my sdk rtos v5.01 for windows. Can this errata affect my board?

I want to execute gmac diag test with gigabit speed. Can you help me what I am missing here?

Any help will be appreciated.

Regards

  • Hi,

    I looked at the user guide: software-dl.ti.com/.../Board_EVM_Abstration.html

    3.3.2.14. GMAC Test
    This test verifies the GMAC Ethernet ports of the HW platform under test.

    3.3.2.14.1. Test Accessories
    Ethernet loopback cables/plugs

    3.3.2.14.2. Test Setup
    Connect the Ethernet loopback cables to the GMAC Ethernet port (RJ-45) on the board. Check below table for the details of GMAC Ethernet ports used by the test on different platforms.

    HW Platform Ethernet Port
    idkAM571x J10 & J12
    idkAM572x J10 & J12
    idkAM574x J10 & J12
    evmAM572x Both ports of P5
    3.3.2.14.3. Test Execution
    Select the menu option to run ‘gmac_TEST’
    Verify the test log on serial console
    3.3.2.14.4. Test Log
    Sample log for GMAC test is shown below

    *********************************************
    * GMAC Test *
    *********************************************
    Test Port Link Link-Speed Status Error
    -------------------- ---- ---- -------------------- ------ ---------------------------
    Phy Loopback 1 Up Phy Loopback PASS
    10Mbps Full-Duplex 1 Up 10Mbps Full duplex PASS
    100Mbps Half-Duplex 1 Up 100Mbps Half duplex PASS
    100Mbps Full-Duplex 1 Up 100Mbps Full duplex PASS
    Phy Loopback 2 Up Phy Loopback PASS
    10Mbps Full-Duplex 2 Up 10Mbps Full duplex PASS
    100Mbps Half-Duplex 2 Up 100Mbps Half duplex PASS
    100Mbps Full-Duplex 2 Up 100Mbps Full duplex PASS
    Exiting

    It looks the GMAC_TEST doesn't support the 1Gbps loopback test. Let me check why is that and get back to you.

    Regards, Eric
  • Thanks for reply Eric.

    I have the same results with you. But as I have stated in my first comment, hardware user's guide of evmAM5728 board has MICREL_KSZ9031RNX phy which supports 1Gbps you can check its datasheet. But the gmac_main.c has a line in "change speed" part like this:

    if(fGig && (phy_type!=PHY_MICREL_KSZ9031RNX))
    speed=SPEED_1000F;
    else
    fDone=TRUE;

    Because of that line the test does not execute 1Gbps speed. I changed that line with if(fGig && (phy_type ==PHY_MICREL_KSZ9031RNX)). It changed the speed to 1000Mbps but test have failed while executing at this speed. I connected ethernet looper to both P5 ports as I stated my above comment. It looks hardware supports 1Gbps but I could not make it work.

    Please inform me with your findings.

    Regards
  • Hi,

    I am still checking why we removed the PHY 1000Mbps loopback in the diagnostics test. But I knew in the network test, we have that running on 1Gbps without any issue. We have such network throughput test: NIMU_FtpExample_evmAM572x_arm/dsp/m4Example

    Regards, Eric
  • Thanks Eric for your interest and help.

    I will try the NIMU test. Please inform me if there is any progress in diag test.
    Regards.
  • Hi,

    From our diagnostic developer, the MICREL PHY has a limitation that it does not work at gigabit speed when we use loopback cable. So the diagnostic tests skips the 1000mpbs speed test for MICREL PHY.

    Regards, Eric
  • Thank you Eric,
    I will try to test 1Gbps with RTOS tests