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.

DP83867CS: Ethernet is not working at 1000Mbps speed where as other speeds it is working, need help on BIST too

Part Number: DP83867CS
Other Parts Discussed in Thread: DP83867CR

Hi Everyone,

Please note we are in critical phase of project.

We have ZYNC-ZC702 based custom board where we have connected, two DP83867E phys to two macs, GEM0, and GEM1. We have configured the both phys in RGMII mode.

But out of two MACs only one MAC, GEM0 is running at 1000Mbps speed and other GEM1 is working only at 10Mbps and 100Mbps

GEM1,

1.  Working at 10/100Mbps only

2. If I do ifconfig up eth1, it will configure itself in full dublex, 1000Mbps and auto-negotiation mode

On Linux:

At 1000Mbps, GEM1 doesn't get the IP through DHCP. I verified that no packets are being sent from this interface by running wireshark, this essentially mean MAC is not working

I have attached dump of phy register contents, after completion of auto-negotiation for both working and non-working MAC instance when running Linux

Please note that in attached archive post_auto_neg.zip,

     post_auto_neg_eth0.log - Register dump for Phy registers post auto-neg for working MAC

     post_auto_neg_eth1.log - Regdump for Phy registers post auto-neg for non-working MAC
From the diff of register dump of both phys, I interpret that,

Register 0x08

1 > Received page is a Message Page.

Register 0x09

1 > Advertise 1000Base-T Full Duplex ability.

Register 0x0A

1 > Manual Master/Slave Configuration fault detected.

2 > Local receiver is not OK.

3 > Remote receiver is not OK.

4 > Link partner not capable of 1000Base-T Full Duplex.

5 > Link partner not capable of 1000Base-T Half Duplex.
Please note that both the phys are DP83867CR to be configured in RGMII interface.

On Xilinx Baremetal:

In order to debug it further, I tried to perform BIST test. I have attached the pseudo code for same, please let me know whether the steps are correct.

With BIST, following  is the result,

Byte count 4098 Error byte count 128

The above result is with auto-negotiation turned on. Auto-neg sets phy to 1000Mbps,Full-duplex link and link is up

Please note that I am not able to disable auto-negotiation bit. Even after clearing 12th bit of BMCR, auto-negotiation is not disabled. SGMII_EN bit 11, is set even though this bit is not set.

Following is our set-up:

I/O voltages that we are using is 2.7V and following are strap register values

Following are registers for strap, in format of <Strap pin, Rhi, Rlo>

==================================================================

Strap pins in Mode 2:
G1LED_0, 6.2K,1.6K
G1LED_1, 6.2K,1.6K
G1LED_2, 6.2K,1.6K
G1ETH_RXD0, 6.2K,1.6K
G1ETH_GPIO1, 6.2K,1.6K

G2LED_0, 6.2K, 1.6K
G2LED_1, 6.2K, 1.6K
G2LED_2, 6.2K, 1.6K
G2ETH_GPIO1, 6.2K, 1.6K

Strap pins in Mode 1:
G1ETH_RXD2, Open, 1.6K
G1ETH_GPIO0, Open, 1.6K

G2ETH_RXD2, Open, 1.6K
G2ETH_GPIO0, Open, 1.6K

Strap pins in Mode 4:
G1ETH_RXCTRL, 960, 1.6K
G2ETH_RXCTRL, 960, 1.6K
G2ETH_RXD0, 960, 1.6K

============================================

2821.post_auto_neg.zip

/* Set RGMII mode */
reg_val = REGR16(DP_RGMIICT); 
reg_val |= (1 << 7);
REGW16(DP_RGMIICT, reg_val);

/* Set MDI mode manually */
reg_val = REGR16(DP_PHYCR);
if (mdix == 0) {
    printf("Setting MDI connection manually\n");
    reg_val &= ~(3 << 5);
} else { 
    printf("Setting MDIX connection\n");
    reg_val &= ~(3 << 5);
    reg_val |= (1 << 5);
}
REGW16(DP_PHYCR, reg_val);

/* Set-up BMCR */
reg_val = REGR16(DP_BMCR);

/* Set-up speed */
printf("Speed: ");
switch (speed) {
    case 1000:
        printf("1000BaseT\n");
        reg_val |= (0x1 << 6); /* Set 1000BaseT*/
        reg_val &= ~(0x1 << 13);
        break;
    case 100:
        printf("100BaseT\n");
        reg_val &= ~(0x1 << 6); /* Set 100BaseT*/
        reg_val |= 0x1 << 13;
        break;
    case 10:
        printf("10BaseT\n");
        reg_val &= ~(0x1 << 6); /* Set 10BaseT*/
        reg_val &= ~(0x1 << 13);
        break;
};

/* Set-up auto negotiation */
printf("Autoneg : %s\n", auto_neg ? "ON" : "OFF");
if (!auto_neg) {
    reg_val &= ~(0x1 << 12); /* Disable auto-negotiation */
} else {
    reg_val |= (0x1 << 12); /* Enable auto-negotiation */
}

/* Set-up duplex type */
printf("Duplex : %s\n", duplex_type == full_duplex ? "FULL" : "HALF");
if (duplex_type == full_duplex) {
    reg_val |= 0x1 << 8; /* Full duplex */
} else {
    reg_val &= ~(0x1 << 8); /* Half duplex */
}

REGW16(DP_BMCR, reg_val);

/* Soft reset */
reg_val = REGR16(DP_BMCR);
reg_val |= 0x1 << 15;
REGW16(DP_BMCR, reg_val);

printf("Waiting for reset to complete ...\n");
do {
    reg_val = REGR16(DP_BMCR);
} while (reg_val & (1 << 15));

/* Wait for link training to complete */
printf("Link status 0x%x\n", REGR16(DP_PHYSTS));
printf("Waiting for link to be up ..\n");
while (!(REGR16(DP_PHYSTS) & (1 << 10)));

printf("BMCR 0x%x\n", REGR16(DP_BMCR));

/* PRBS count mode */
REGW16_FIELD(DP_BISCR, PRBS_COUNT_MODE, 1);

/* PRBS generate packet */
REGW16_FIELD(DP_BISCR, GEN_PRBS_PACKET, 1);

/* Disable PCS loop-back */
REGW16_FIELD(DP_BISCR, PCS_LOOPBACK, 0);

/* Non-PCS loop-back */
{

    switch(loop_back) {
        case BISCR_LOOPBACK_MODE_digital_loop:
            printf("Digital loop-back\n");
            break;
        case BISCR_LOOPBACK_MODE_analog_loop:
            printf("Analog loop-back\n");
            break;
        case BISCR_LOOPBACK_MODE_external_loop:
            printf("External loop-back\n");
            break;
        case BISCR_LOOPBACK_MODE_reverse_loop: 
            printf("Reverse loop-back\n");
            break;
    };

    REGW16_FIELD(DP_BISCR, LOOPBACK_MODE, loop_back);
}

printf("<<<<<<<<<<<<<<<<<<<< Reg dump >>>>>>>>>>>>>>>>>>>>\n");
printf("DP_PHYIDR1 0x%x\n", REGR16(DP_PHYIDR1));
printf("DP_RGMIICT 0x%x\n", REGR16(DP_RGMIICT));
printf("DP_PHYCR 0x%x\n", REGR16(DP_PHYCR));
printf("DP_RGMIIDCTL 0x%x\n", REGR16(DP_RGMIIDCTL));
printf("DP_BMCR 0x%x\n", REGR16(DP_BMCR));
printf("DP_BISCR 0x%x\n", REGR16(DP_BISCR));
printf("==================================================\n");

/* Enable packet generation */
REGW16_FIELD(DP_BISCR, PACKET_GEN_EN, 1);

/* Wait for lock to release */
do {
    if (REGR16_FIELD(DP_STS2, PRBS_LOCK) == 1)
        locked = 1;
    if (--count == 0) {
        break;
    }
} while (!locked);


if (REGR16_FIELD(DP_STS2, PRBS_LOCK_LOST) == 1)
    lost_lock = 1;

byte_cnt = REGR16(DP_BICSR1);

/* Stop and clear PRB counter */
REGW16(DP_BICSR1, 0x3);

/* In continous mode error is checked once packet generator is disabled */
REGW16_FIELD(DP_BISCR, PACKET_GEN_EN, 0);
err_byte_cnt = REGR16_FIELD(DP_BICSR2, PRBS_ERR_CNT);

if (REGR16_FIELD(DP_STS2, PKT_GEN_BUSY) == 1)
    busy = 1;

printf("Busy bit 0x%x, Locked status 0x%x\n",
            REGR16_FIELD(DP_STS2, PKT_GEN_BUSY),
            REGR16_FIELD(DP_STS2, PRBS_LOCK));

locked = REGR16_FIELD(DP_STS2, PRBS_LOCK);
if (locked)
    printf("Locked\n");

if (busy)
    printf("Busy\n");

if (lost_lock)
    printf("lost lock\n");


printf("Byte count %d Error byte count %d\n", byte_cnt, err_byte_cnt);

Regards,

   Abhijit

  • Hi,

    Below logs indicate communication with your Link Partner is not happening properly.

    a. Have you reviewed your hardware schematics ? Can you share for me to look at ?
    b. IO voltage supported are 3.6/2.5/1.8. At 2.7V you are at violating the spec.

    Regards.
    Geet


    Register 0x0A

    1 > Manual Master/Slave Configuration fault detected.

    2 > Local receiver is not OK.

    3 > Remote receiver is not OK.

    4 > Link partner not capable of 1000Base-T Full Duplex.

    5 > Link partner not capable of 1000Base-T Half Duplex.
    Please note that both the phys are DP83867CR to be configured in RGMII interface.
  • Hi Geet,

    Thank you very much for your quick reply.

    Please find my reply in line

    Geet Modi said:
    Hi,

    Below logs indicate communication with your Link Partner is not happening properly.

    a. Have you reviewed your hardware schematics ? Can you share for me to look at ?

    Yes we got the schematic reviewed. Please find the attached schematic.5751.rpcoc-bb-ti-review.pdf


    b. IO voltage supported are 3.6/2.5/1.8. At 2.7V you are at violating the spec.

    VDDIO voltage is brought up due to I/O voltage requirements from ZYNC7000 processor. This was earlier 3.3V, but due to warning brought out by Zync that RGMII may not work at 3.3V, we have to change that to 2.7V. This changes we have verified with TI here

    But just to bring to your notice, working phy has also same design.

    The Phy is working at 10Mbps/100Mbps, can this mean Tx/Rx lines that line 4,5,7 or 8 which are not part of 10/100Mbps by 1000Mbps can have interface issue?

    Regards.
    Geet


    Register 0x0A

    1 > Manual Master/Slave Configuration fault detected.

    2 > Local receiver is not OK.

    3 > Remote receiver is not OK.

    4 > Link partner not capable of 1000Base-T Full Duplex.

    5 > Link partner not capable of 1000Base-T Half Duplex.
    Please note that both the phys are DP83867CRto be configured in RGMII interface.

  • Further, looked at register dumpe attached. In one of the phy, 0x013 shows AUTONEG_ERR is set. Looks like the phy is not able to negotiate the capabilities provided by Link partner.

    Suggest, use the same Link-Partner working with other Phy in 1G mode on phy linking up in 100M mode.

    Regards,
    Geet
  • Hi Geet,

    We are using a switch for connecting both Phys. We interchanged ports between phys and also we changed cable.

    Can you please let me know whether BIST will be helpful to debug? If yes then what is the procedure. I didn't found steps for performing BIST, but I tried the way I interpreted from datasheet.

    Can line number 4,5,7 or 8 on RJ45 be an issue?

  • Hi,

    I don't know what do you mean by BIST from Ethernet Phy point of view. We have internal loopback test available but not sure how they can help in this scenario ?

    Given both phy schematics are exactly same, suggest you look out for assembly or routing differences between two.

    Can you try connecting two Phy with each other thru a cross cable ?

    Regards,

    Geet

  • Hi Geet,

    BIST is Built In Self Test where pseudo random packets are generated in different loop-back setup and error bytes are counted

    BIST is one of diagnostic method presented here. This can help us at which point phy has error.

    Our hardware team has verified routing and assembly aspect, any way we have plans to test the same thing with different spin of the board but that may take some time

    We will connect both phys test as you suggested, but I am unclear how may it will be helpful.

    Just to clarify, are there any concerns when more than one phys are connected.

    One more point to be noted is, MDIO/MDC lines of both phys is connected to MAC that is working. i.e GEM0, can it cause issue.

    Can we suspect TX/RX lines which are not in picture for 10/100Mbps??

    Is RGMII receive/transmit delay have role to play in this issue?

    Thank you for help

    Regards,

    Abhijit

  • Hi,

    BIST : Ok, I was also guessing same but wanted to be sure. Yes, you can try doing that. You can do analog loopback on phy 2 ( having issue) and other phy .

    On MDIO from MAC to two phy : It's a normal configuration on switches and shall not impact the link-up.

    RGMII Tx/Rx delay : again these get in play only during data transfer which is next step once you have successful link-up.


    Yes, trying it on other board may be a good idea just to isolate the assembly issues. Also, you may want to try by power-ing down first phy .


    Between two gigabit phy : Given you setup is showing AUTO_NEG error. I thought this may help connecting two phys with known configuration and if they show any different behaviour. Also, you can try using Force Gigabit mode ( one in master and other in slave) and try linking them.

    Regards,
    Geet
  • Hi Geet,

    There is very less documentation on BIST available on net. As mentioned earlier I tested with BIST but it is showing error at 10/100Mbps too, which is supposed to be working case. Can you please verify register write sequence in the pseudo code that is shared with you? or as this is inherent and important feature, TI must have used it and there may be flow diagram available with TI, can you share such docs?

    /* Set RGMII mode */
    reg_val = REGR16(DP_RGMIICT); 
    reg_val |= (1 << 7);
    REGW16(DP_RGMIICT, reg_val);
    
    /* Set MDI mode manually */
    reg_val = REGR16(DP_PHYCR);
    if (mdix == 0) {
        printf("Setting MDI connection manually\n");
        reg_val &= ~(3 << 5);
    } else { 
        printf("Setting MDIX connection\n");
        reg_val &= ~(3 << 5);
        reg_val |= (1 << 5);
    }
    REGW16(DP_PHYCR, reg_val);
    
    /* Set-up BMCR */
    reg_val = REGR16(DP_BMCR);
    
    /* Set-up speed */
    printf("Speed: ");
    switch (speed) {
        case 1000:
            printf("1000BaseT\n");
            reg_val |= (0x1 << 6); /* Set 1000BaseT*/
            reg_val &= ~(0x1 << 13);
            break;
        case 100:
            printf("100BaseT\n");
            reg_val &= ~(0x1 << 6); /* Set 100BaseT*/
            reg_val |= 0x1 << 13;
            break;
        case 10:
            printf("10BaseT\n");
            reg_val &= ~(0x1 << 6); /* Set 10BaseT*/
            reg_val &= ~(0x1 << 13);
            break;
    };
    
    /* Set-up auto negotiation */
    printf("Autoneg : %s\n", auto_neg ? "ON" : "OFF");
    if (!auto_neg) {
        reg_val &= ~(0x1 << 12); /* Disable auto-negotiation */
    } else {
        reg_val |= (0x1 << 12); /* Enable auto-negotiation */
    }
    
    /* Set-up duplex type */
    printf("Duplex : %s\n", duplex_type == full_duplex ? "FULL" : "HALF");
    if (duplex_type == full_duplex) {
        reg_val |= 0x1 << 8; /* Full duplex */
    } else {
        reg_val &= ~(0x1 << 8); /* Half duplex */
    }
    
    REGW16(DP_BMCR, reg_val);
    
    /* Soft reset */
    reg_val = REGR16(DP_BMCR);
    reg_val |= 0x1 << 15;
    REGW16(DP_BMCR, reg_val);
    
    printf("Waiting for reset to complete ...\n");
    do {
        reg_val = REGR16(DP_BMCR);
    } while (reg_val & (1 << 15));
    
    /* Wait for link training to complete */
    printf("Link status 0x%x\n", REGR16(DP_PHYSTS));
    printf("Waiting for link to be up ..\n");
    while (!(REGR16(DP_PHYSTS) & (1 << 10)));
    
    printf("BMCR 0x%x\n", REGR16(DP_BMCR));
    
    /* PRBS count mode */
    REGW16_FIELD(DP_BISCR, PRBS_COUNT_MODE, 1);
    
    /* PRBS generate packet */
    REGW16_FIELD(DP_BISCR, GEN_PRBS_PACKET, 1);
    
    /* Disable PCS loop-back */
    REGW16_FIELD(DP_BISCR, PCS_LOOPBACK, 0);
    
    /* Non-PCS loop-back */
    {
    
        switch(loop_back) {
            case BISCR_LOOPBACK_MODE_digital_loop:
                printf("Digital loop-back\n");
                break;
            case BISCR_LOOPBACK_MODE_analog_loop:
                printf("Analog loop-back\n");
                break;
            case BISCR_LOOPBACK_MODE_external_loop:
                printf("External loop-back\n");
                break;
            case BISCR_LOOPBACK_MODE_reverse_loop: 
                printf("Reverse loop-back\n");
                break;
        };
    
        REGW16_FIELD(DP_BISCR, LOOPBACK_MODE, loop_back);
    }
    
    printf("<<<<<<<<<<<<<<<<<<<< Reg dump >>>>>>>>>>>>>>>>>>>>\n");
    printf("DP_PHYIDR1 0x%x\n", REGR16(DP_PHYIDR1));
    printf("DP_RGMIICT 0x%x\n", REGR16(DP_RGMIICT));
    printf("DP_PHYCR 0x%x\n", REGR16(DP_PHYCR));
    printf("DP_RGMIIDCTL 0x%x\n", REGR16(DP_RGMIIDCTL));
    printf("DP_BMCR 0x%x\n", REGR16(DP_BMCR));
    printf("DP_BISCR 0x%x\n", REGR16(DP_BISCR));
    printf("==================================================\n");
    
    /* Enable packet generation */
    REGW16_FIELD(DP_BISCR, PACKET_GEN_EN, 1);
    
    /* Wait for lock to release */
    do {
        if (REGR16_FIELD(DP_STS2, PRBS_LOCK) == 1)
            locked = 1;
        if (--count == 0) {
            break;
        }
    } while (!locked);
    
    
    if (REGR16_FIELD(DP_STS2, PRBS_LOCK_LOST) == 1)
        lost_lock = 1;
    
    byte_cnt = REGR16(DP_BICSR1);
    
    /* Stop and clear PRB counter */
    REGW16(DP_BICSR1, 0x3);
    
    /* In continous mode error is checked once packet generator is disabled */
    REGW16_FIELD(DP_BISCR, PACKET_GEN_EN, 0);
    err_byte_cnt = REGR16_FIELD(DP_BICSR2, PRBS_ERR_CNT);
    
    if (REGR16_FIELD(DP_STS2, PKT_GEN_BUSY) == 1)
        busy = 1;
    
    printf("Busy bit 0x%x, Locked status 0x%x\n",
                REGR16_FIELD(DP_STS2, PKT_GEN_BUSY),
                REGR16_FIELD(DP_STS2, PRBS_LOCK));
    
    locked = REGR16_FIELD(DP_STS2, PRBS_LOCK);
    if (locked)
        printf("Locked\n");
    
    if (busy)
        printf("Busy\n");
    
    if (lost_lock)
        printf("lost lock\n");
    
    
    printf("Byte count %d Error byte count %d\n", byte_cnt, err_byte_cnt);
    

  • Hi,

    Please refer to below application note on how to use the Loopback modes.

    Regards,
    Geet


    www.ti.com/.../snla246a.pdf
  • Hi Geet,

    If I go for loop-back, I have to modify MAC code, otherwise how I will verify received data. whether I have to ping and compare received and transmitted buffer at driver level??, what is the procedure for same.

    How TI ideally validates phy from software?

    If I go for BIST, MAC doesn't involve any code changes, it will be verified by phy itself. I believe purpose of BIST is for debugging this type of issues only, please let me know if I am wrong.

    "MII Loopback is configured using the BMCR (register address 0x0000). All other loopback
    modes are enabled using the BISCR (register address 0x0016)." - This implies that I can still loop-back in BIST mode, which I am doing.
  • Phy do have internal PRBS ( packet generator). See below procedure to use it to check the connectivity.

    a. Connect 2 PHYs through MDI and set PRBS in the first PHY (0x0016 = 0xF000).
    b. On the second PHY, read the PRBS checker registers (0x0016, 0x0017, 0x0071, 0x0072)

    Alternatively, you can do reverse loopback on the second PHY (0x0016 = 0x0020) and read checker registers on the first PHY. This can help check both transmit and receive paths. Procedure to perform reverse loopback is mentioned in datasheet.

    Regards,
    Geet
  • Hi ,

    I missed to respond to you last questions. You still having the issues or resolved ?

    Regards,
    Geet
  • Hi Geet,

    Sorry for delay in response.

    Please find the register write sequence for BIST test where both working phy(At address 3) and non-working phy(At address 2) are connected with straight cable.

    PRBS are enabled for both phys and Error count and byte received are printed only for phy at address 2

    Entering into main() 

    Preparing for BIST 3..

    /* Phy@3:Setting RGMII mode */
    Extended Write:Phy @3 0x32=0xd3

    /* Phy@3:Setting MDI connection manually */
    Normal Write:Phy @3 0x10=0x5808

    /* Phy@3:Setting RGMII Rx delay to 0x8 and Tx delay to 0xa */
    Extended Write:Phy @3 0x86=0xa8

    /* Phy@3:
    Duplex : FULL
    Speed: 1000BaseT
    Autoneg : ON
    */
    Normal Write:Phy @3 0x0=0x1140

    /*Phy@3: Perform soft reset */
    Normal Write:Phy @3 0x1f=0x4000
    /*Phy@3: Waiting for reset to complete ...*/
    Normal Write:Phy @3 0x16=0xc000
    Normal Write:Phy @3 0x16=0xc000
    Normal Write:Phy @3 0x16=0xc000

    /*Phy@3:No loop-back  ...*/
    Normal Write:Phy @3 0x16=0xc000

    /* Phy@3: Regdump before start PRB generation */
    <<<<<<<<<<<<<<<<<<<< Reg dump >>>>>>>>>>>>>>>>>>>>
    DP_PHYIDR1 0x2000
    DP_RGMIICT 0xd3
    DP_PHYCR 0x5808
    DP_RGMIIDCTL 0xa8
    DP_BMCR 0x1140
    DP_BISCR 0xc000
    DP_LOOPCR 0xe721
    ==================================================
    Preparing for BIST 2..

    /* Phy@2:Setting RGMII mode */
    Extended Write:Phy @2 0x32=0xd3

    /* Phy@2:Setting MDI connection manually */
    Normal Write:Phy @2 0x10=0x5808

    /* Phy@2:Setting RGMII Rx delay to 0x8 and Tx delay to 0xa */
    Extended Write:Phy @2 0x86=0xa8

    /* Phy@2:
    Duplex : FULL
    Speed: 1000BaseT
    Autoneg : ON
    */
    Normal Write:Phy @2 0x0=0x1140

    /*Phy@2: Perform soft reset */
    Normal Write:Phy @2 0x1f=0x4000
    /*Phy@2: Waiting for reset to complete ...*/
    Normal Write:Phy @2 0x16=0x8000
    Normal Write:Phy @2 0x16=0xc000
    Normal Write:Phy @2 0x16=0xc000
    /*Phy@2:No loop-back  ...*/
    Normal Write:Phy @2 0x16=0xc000

    /* Phy@2: Regdump before start PRB generation */
    <<<<<<<<<<<<<<<<<<<< Reg dump >>>>>>>>>>>>>>>>>>>>
    DP_PHYIDR1 0x2000
    DP_RGMIICT 0xd3
    DP_PHYCR 0x5808
    DP_RGMIIDCTL 0xa8
    DP_BMCR 0x1140
    DP_BISCR 0xc000
    DP_LOOPCR 0xe721
    ==================================================

    Starting BIST on Phy@3 ..
    [1] Busy bit 0x0
    Normal Write:Phy @3 0x16=0xd000
    [2] Busy bit 0x1
    Starting BIST on Phy@2..
    [1] Busy bit 0x0
    Normal Write:Phy @2 0x16=0xd000
    [2] Busy bit 0x1
    Checking for status registers on Phy@2..
    Dumping BIST related registers before checking for lock0x16: 0xd000
    0x71: 0x0
    0x72: 0x0
    0x17: 0x240
    Extended Write:Phy @2 0x72=0x1
    Normal Write:Phy @2 0x16=0xc000
    Busy bit 0x0, Locked status 0x0
    Printing BIST related registers post lock check
    Dumping BIST related registers before checking for lock0x16: 0xc000
    0x71: 0x0
    0x72: 0x0
    0x17: 0x40
    Byte count 0 Error byte count 0
     
    Please let me know how the PRBS data are verified by phy when PRBS is not being generated by itself?

    One more point to note that, we are able to perform sample example from Xilinx for loop-back with MII loop-back, but same fails if we do digital loop-back. i.e BISCR |= (1 << 2). Please let know why this behavior even when we are following sequence in data sheet. Even for working Phy the loop-back fails

    Can you please confirm sequence for digital loop-back? I have very high hopes with TI to help in solving such trivial issue.

    Warm Regards,
        Abhijit
  • Hi,

    Following are the procedures.

    Regards,
    Geet



    BIST/PRBS check

    After initial settings of RGMII clock shift mode (according to E2E thread) and Forced MDI mode (the link partner should be in MDIX mode 0x0010 = 0x5828), check for link (1G, Full Duplex)

    Procedure for PRBS error count:
    1. Start PRBS on DUT1:
    0x0016 = 0xD000
    2. Enable PRBS checker on DUT2:
    0x0016 = 0xC000
    3. Check PRBS lock in DUT2
    0x0017.11 should be 1 and 0x0017.10 should be 0
    4. Lock the PRBS count
    0x0072.0 = 1
    5. Read received byte count:
    0x0071.[15:0]
    6. Read receive error count:
    0x0072.[7:0]
    7. To clear the PRBS count
    0x0072.1 = 1
    8. Read the new count after reset:
    0x0071 = 0x0001


    In single packet gen mode on DUT1, Proper frame sent
    0x0016 = 0x1000 (For 1518 Byte single packet)
    0x0016 = 0x3000 (For 64 Byte single packet)

    In continuous mode PRBS sent
    0x0016 = 0x7000/0xF000 (Packet size to be set in 0x007B in hex)


    Digital Loopback

    1. 0x00FE = 0xE720
    2. 0x0000 = 0x0140 (Auto-negotiation disabled)
    3. 0x0010 = 0x5008 (Forced MDI mode)
    4. 0x0016 = 0xD004 (Continuous packet PRBS generation enabled, Digital loopback enabled)
    5. Check link should be up
    6. 0x0017.11 should be 1 and 0x0017.10 should be 0
    7. Follow the procedure for PRBS checker to read the received byte count
  • Hi Geet,

    Thank you very much for your kind response. I am able to test BIST in digital loop-back mode. Please allow me to mark the answer as resolved.

    But following are observations,
    1. Digital loop-back BIST test is showing error count as zero for both working and non-working phy, which indicates phys are fine till digital block
    2. Analog loop-back for non-working phy is showing 39 bytes of 17696 as error
    3. Where as link is not getting ready for analog loop-back of working phy
    We have terminated working phy with termination of 100Ohm for RJ45

    Only change what I did in code is 0x0016 = 0xD008

    Please help us in concluding this quick
  • Hi Abhijit,

    Can you confirm the following indications in your usecase:
    1. Link status of non working PHY? Can you read 0x0011?
    2. RX_CLK frequency on RGMII I/F of non working PHY?
    3. TX_CLK clock frequency from the MAC?
    4. Strap configuration status registers (Read 0x006E and 0x006F) on both the PHYs


    Can you also try the following procedure:
    1. Connect the DUT1 to DUT2 through CAT5e cable. Check whether link is up in 1000M mode (0x0011 = 0xBC02/0xAC02)
    2. Enable reverse loopback on DUT2 (0x0016 = 0x0020). No need of other configurations for reverse loopback
    3. Start packets on the MAC of DUT1
    4. Check if there are any errors in the packets received back after loopback

    You can then swap the functionalities (Packets from DUT2 and reverse loopback on DUT1 ) and check
    This will ensure the proper functionality of MAC and MDI interfaces on both the PHYs at 1G speed.


    Regards,
    Anmol