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.

DP83TC812R-Q1: dp83tc812r PHY diagnostics test

Part Number: DP83TC812R-Q1

Dear TI Team,

It is seen that certain diagnostics tests do not function as intended.


1) Time Domain Reflectometry:
a) after performing TDR is activated by setting bit[15] in register 0x1E
b) wait 100ms
c) readback of 0x1e = 0x3 (Indicates TDR is completed but has faults), ideally it must be
0x2
d) readback of 0x310 = 0x0

2) BIST and loopback tests
a) MII loopback appeared to work ok, since as per register settings which are required to
be enabled Rx Cnt seem to be present after reading this registers: 0x063C, 0x063D, 0x063E
b) However Rx Cnt seemed to be zero for all the other loopback tests (which are also enabled accoring
to the spec); including PCS, Digital, AFE, Reverse Loopback

The MAC Controller is configured in RGMII mode, however I am not sure all the required register settings
for the PHY itself has been dp83tc812r configured.

Regards,

Annamalai

  • The TDR tests looked ok, please support only on the remaining BIST tests , also there is no special mention for the loopback tests in the application note

  • Hi Annamalai,

    Please show me the register writes you are using to configure each loopback mode.

    Thanks,

    David

  • HI David,

    Following are the configurations I am using as mentioned in datasheet:

    pcs loopback mac:
    write 0x16    0x0102
    write 0x619   0x1555
    write 0x624   0x55bf
    read 0x63c 0x63d, 0x63e


    pcs loopback cable
    write 0x16    0x0102
    write 0x619   0x557
    write 0x624   0x55bf

    write 0x620 0x1
    read 0x620

    repeat above 2 steps

    digital loopback mac:
    write 0x16    0x0104
    write 0x619   0x1555
    write 0x624   0x55bf
    read 0x63c 0x63d, 0x63e


    digital loopback cable
    write 0x16    0x0104
    write 0x619   0x557
    write 0x624   0x55bf

    write 0x620 0x1
    read 0x620

    repeat above 2 steps

    afe loopback mac:
    write 0x16    0x0108
    write 0x619   0x1555
    write 0x624   0x55bf
    read 0x63c 0x63d, 0x63e


    afe loopback cable
    write 0x16    0x0108
    write 0x619   0x557
    write 0x624   0x55bf

    write 0x620 0x1
    read 0x620

    repeat above 2

    Regards

    Annamalai

  • Hi Annamalai,

    First, I'd like to confirm you are using the correct write sequence for the extended registers. Any register outside 0x00-0x1F is an extended register, so you must use the procedure described in section 8.4.15 of the datasheet. Can you confirm you are using this procedure?

    Next, you said MII loopback is working fine. Can you try the other loopback modes, without internal data generator/checker, but using the MAC's data generator and checker. For this you will just need to write to register 0x16. Let me know the result.

    Thanks,

    David

  • HI David,

    I am preforming the register writes as described in the manual (i do also extended writes where needed)

    I see only Rx Activitiy in MII Loopback tests (This is how i see MII test working), but they seemed all 0 for other cases,

    I tried writing only 0x16 register but still same behaviour.

    Here are my test resutls

    # ./continental-phytest -b 511
    MII Loopback test data:
    Rx0         :1d
    Rx1         :0
    Rx(Errors)  :0
    PCS MAC Loopback test data:
    Rx0         :2
    Rx1         :0
    Rx(Errors)  :0
    PCS Cable Loopback test data:
    PCS Cable loopback status         :9ff
    Digital MAC Loopback test data:
    Rx0         :0
    Rx1         :0
    Rx(Errors)  :0
    Digital Cable Loopback test data:
    Digital Cable loopback status         :0
    AFE MAC Loopback test data:
    Rx0         :0
    Rx1         :0
    Rx(Errors)  :0
    AFE Cable Loopback test data:
    AFE Cable loopback status         :0
    Reverse MAC Loopback test data:
    Rx0         :0
    Rx1         :0
    Rx(Errors)  :0
    Reverse Cable Loopback test data:
    Reverse Cable loopback status         :0

    Regards

    Annamalai

  • Do you have any further suggestions to try? or this tests validated?

  • Hi Annamalai,

    I cannot make anything of the above text you sent. Please send me a block diagram that shows the data path for each test, from generation to checking. We almost never see one loopback mode working, but others not, so I am guessing there is a configuration/setup issue.

    Thanks,

    David

  • HI David

    Here is block diagram from datasheet (I hope this is what you needed), this is only an internal loopback test, but I have a proper ping from the host as well:

    What I am doing is just configuring the registers for loopback test and reading the values of registers 0x63c (Rx0) , 0x63d (Rx1), 0x63e (Rx Error), the test is as simple as this.

    When I read back i read all 0s for the test which I consider as failure since I expect some activity at least.

    If you suspect there are some other configuration (regiseters) needed do let me know

    PS: I have a setup where ping works.

    Regards

    Annamalai

  • HI,

    Thanks now, I could resolve the above issue, but its narrowed down there are 2 issues which needs support:

    (I needed to add delay before reading the Rx Registers):

    Following needs the support

    1) PCS loopback cable test:

    Following are done in SW side

    It is seen that after reading 0x620, I am getting : 0x9ff (which indicates prbs lock and prbs errors)

    2) Same I see with Digital cable loopback tests as well there is prbs lock and prbs error

    Regards

    Annamalai

  • I write 0x02 in 0x620 (hope this is the correct value)

  • the above issue seemed to happen with enabling data checker

  • HI ,

    I want to summarize the issues I am facing :

    PRBS Enabled

    1) AFE loopback MAC test : With PRBS data generator and checker enabled, AFE loopback MAC is not consistent:

    It works some time (Rx activity), but some time not (some times no data in Rx side)

    2) PCS loopback cable test and Digital loopback cables test:

    After the configurations.

    It is seen that after reading 0x620, I am getting : 0x9ff (which indicates prbs lock and prbs errors)

    PS: It is seen that most of other tests are OK, eg: MII AC, PCS MAC, Digital MAC, Reverse cable loopback and MAC

    PRBS Disabled

    It is seen that with external data source MII and Reverse MAC tests are Ok ( I see Rx Data).

    The following cases have no data:

    1) PCS loopback MAC:

    2) Digital loopback MAC

    3) AFE loopback MAC

    Please let me know your opinion, and any debug (HW/SW) steps to isolate further

    Thanks for your support.

    Regards,

    Annamalai

  • Hi Annamalai,

    Is there an issue you are trying to solve by doing this loopback testing? 

    I think there are 2 misunderstandings here:

    1. The only cable side loopback test is reverse loopback, there is no such thing as a PCS Cable Loopback test or Digital loopback cables test. What you have seen in the datasheet is the ability to enable data generation and checking towards the cable side, but the PCS, Digital, and AFE loopback will only occur towards the MAC.

    2.  When you are doing PCS, Digital, or AFE loopback tests, all registers should be reset to default, and the only write necessary is register 0x16. Data should be generated and checked by the MAC. Registers 0x63C, 0x63D, 0x63E should not be used. Please show me the results of the xMII, PCS, Digital, and AFE loopback tests as shown by the MAC.

    Thanks,

    David

  • HI David

    This is a customer requirement and we are just trying to perform loopback test as a part of what is mentioned in the datasheet of the device, I am just plainly following the instructions followed in the datasheet.

    1)

    So, you recommend not to exercise few loopback tests?

    Actually, I could not understand the term cable loopback tests, what is the setup required and how to execute the aforementioned cable loopback tests?

    2)

    When you are doing PCS, Digital, or AFE loopback tests, all registers should be reset to default, and the only write necessary is register 0x16. Data should be generated and checked by the MAC. Registers 0x63C, 0x63D, 0x63E should not be used

    I am just following what is mentioned in data sheet as it is simple for the test purpose. when you data should be checked by MAC, you mean the actual Rx Path, number of packets received by the actual device driver correct.?

    Regards

    Annamalai

  • The registers 0x63C, 0x63D, 0x63E should not be used for any test or just PCS, Digital, or AFE loopback tests, ?

  • Hi Annamalai,

    The loopback modes are diagnostic tools to help isolate an issue, we don't recommend validating them in-and-of themselves. If the full data path is able to transfer data, there is no need to do loopback tests. 

    The only cable side loopback test is the reverse loopback test. In this test, data should be generated and checked by a link partner. This can be done by another DP83TC812 PHY using the "Enable data generator/checker for Cable side" and "Check data for Cable side" steps in the datasheet.

    MII, PCS, Digital, AFE loopbacks are all MAC side loopback tests. Data should be generated by the MAC, and data will be looped back by the PHY, so the MAC should be receiving packets and can check for errors.

    Thanks,

    David

  • HI David,

    Sure thanks for the clarification,I have another question.

    Even though I enable a loop back test eg: MII loopback test, still the external ping works.

    I expect that if the loopback mode of the PHY is enabled then the external channel should be disabled right, but this appeared not to be the case.?

    Regards,

    Annamalai

  • HI David,

    [Please ignore my previous comment]

    As per my recent tests, I tried sending data over the MAC layer and tried to enable the loopback modes (without internal data generator)

    In cases like mii, pcs, digital, It is seen that the Tx is ok (I can transmit data over the MAC layer). But there is No Rx interrupt and data over MAC.

    But If I enable data generator I get Rx Data and interrupt at MAC layer

    I used simple ping command to test the activity

    I am initializing the PHY as per the section 3 of application note: [SNLA389A – DECEMBER 2021 – REVISED MAY 2022], I hope its okay.

    Regards

    Annamalai

  • Hi Annamalai,

    It is very difficult to debug this over a text description. Please send me pictures of the setup with labels of the data-flow path, and screenshots of the commands you are running along with results.

    Thanks,

    David

  • HI David,

    I think I can get the MAC loopback tests working all except AFE.

    Now I have a new issue that when I read register 0x871 SQI value its all zero.

    it was working well before, but suddenly I see that reading 0x871 always gives me a zero.

    Although the link is fine and can ping the host machine well.

    I use the extended read for the register.

    Would you know some reason why this could happen

    Regards

    Annamalai

  • I confirm its not a SW issue, since same SW was giving out proper SQI values. But I get all zeros now.

    May be are there any pre-configurations needed ?

  • Hi Annamalai,

    How did you solve the loopback test issue?

    Application note SNLA389A contains the recommended initialization scripts for the DP83TC812.

    Thanks,

    David

  • HI

    It looks a combination of the initialization, setup and way i performed the tests

    Do you know I face the SQI lock up issue, this is quite strange and hw specific , it suddenly stopped working in one of the HW, but the ethernet

    communication is ok

    Regards

    Annamalai

  • Hi Annamalai,

    Please start a new thread so this new SQI issue can be tracked for future reference.

    Thanks,

    David