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.

DP83825I: How to use TDR Cable Diagnostics on the Eth-Phy: DP83825I to detect a short?

Part Number: DP83825I

Tool/software:

Hi,

we do not have buttons or other gpios to interact with our device, so we would like to use a special crafted RJ45 plug to interact with our device.

The special crafted RJ45-Plug has the following connections:

- TD+ and TD- is shorted
- RD+ and RD- is shorted
- Other pins are not connected

1) Is it possible to detect shorts with the DP83825I? I followed the guide (6.3.16.1 TDR) to manually start a cable diagnostic (TDR), but the CDLAR6 Register equals 0x0100, what is reserved for the Eth-Phy. Same result if the RJ45 is kept open without any cable connected.

"TDR can also be run manually using bit[15] in the Cable Diagnostic Control Register (CDCR, address 0x001E). Cable diagnostic status is obtained by reading bits[1:0] in the CDCR. Additional TDR functions including cycle averaging and crossover disable can be found in the Cable Diagnostic Specific Control Register (CDSCR, address 0x0170). TDR [..] store the results in the respective TDR Cable Diagnostic Location Result Registers #1 - #5 (CDLRR, addresses 0x0180 to 0x0184) and the Cable Diagnostic Amplitude Result Registers #1 - #5 (CDLAR, addresses 0x0185 to 0x0189)."

- I noticed, I could not write and read back values in the CDSCR for the cfg_tdr_seg_num. It is always 0, what is reserved.
- I noticed, I could not write and read back values in the CDSCR for the Cable_Diagnostic_Average_Cycles. It is always 0.

 

The ethernet-phy works perfectly in normal operation. We are using linux and using phytool (github.com/.../phytool) to interact with the eth-phy from userspace.

e.g. 

phytool write eth0/0x0/0x001e 0x8000 # Start cable diagnostic
sleep 1
phytool read eth0/0x0/0x018a # Read out CDLAR6

2) What is the cfg_rescal_en in the CDCR used for? Should it be performed together with cable diagnostic?

3) Do I need to perform a (soft) reset beforehand?

Thanks for your support and best regards,

Michael

  • Michael

    When you are running the TDR, is the link still active? Please ensure that the link partner is silent to run TDR (i.e. either not awake, not connected, etc..).
    The purpose of TDR is to detect faults in the line when link is dropped or not established and also to check the quality of the channel when connected to a Link Partner.
    However, for the case when connected to a Link Partner, the Link Partner must be silent so that the injected pulses by the DUT are not influenced by the partner.

    We have an app note on how to use the DP838235I TDR feature, please take a look at this app note and see if it can help you to get the TDR working on the DP83825I EVM.

    snla330a.pdf

    Thanks

    David

  • Hi David,

    the application note looks promising. Nevertheless, I couldnt get it to work.

    First of all, I have some difficulties understanding the application note.

    1. Is the Eth-Phy DP838235I capable of detecting a Short between TD+ and TD- (same for RD+ and RD-)?
    2. Please correct me if I am wrong, the Application Note seems to sum up TD+ and TD- as channel A (RD+ and RD- as channel B). So for detecting a short between TD+ and TD- I have to set "Transmit on A, Receive on A: 0x170[14:13] = 2’b10" ?

    Second:

    I tried to follow the instructions, but could not get it work. Here are the steps I tried:

    - Linux is booted. Network interface eth0 is available, but the plug is either open or we are using a special crafted plug to short 1/2 and 3/6 (TD+ with TD- and RD+ with RD-).
    - I tried to set Segment 1 register config for 0..10m, but not all values are accepted. At least I could not read back the written values for register 0x0456, 0x0416, 0x0190, 0x0173 and 0x0175. Only the new values for 0x0411 and 0x0178 are accepted.

    phytool read eth0/0x0/0x0456 -> 0x0120
    phytool read eth0/0x0/0x0411 -> 0x0113 (Okay)
    phytool read eth0/0x0/0x0416 -> 0x0120
    phytool read eth0/0x0/0x0190 -> 0x0002
    phytool read eth0/0x0/0x0173 -> 0x0807
    phytool read eth0/0x0/0x0175 -> 0x0000 
    phytool read eth0/0x0/0x0178 -> 0x0482 (Okay)
    phytool read eth0/0x0/0x0170 -> 0x0002 (Okay)



    With the not accepted Segment 1 config I tried to start TDR for all 3 cases

    but TDR does not report any error. Here is the output (what is the same for all 4 cases) for CDLAR1(0x185), CDLRR1(0x180) and CDLAR6(0x18A).

    CDCR(0x001E):    0x0102 (2 means TDR has been completed)
    CDLAR1(0x0185): 0x0000 (Peak is reported if non-zero value, but it is)
    CDLRR1(0x0180): 0x3100 (Peak location)
    CDLAR6(0x018A): 0x0100 (Peak sign)

    Best regards,
    Michael

  • Michael

    Please give me couple days and let me see if I can test this condition out on the DP83825I EVM.

    Thanks

    David

  • Hi David,

    Any updates? Did you have the chance to test TDR on the DP838235I?

    Best regards,

    Michael

  • Michael

    I am also not seeing the expected TDR result on the DP83825I EVM, and I am reaching out to our design team for support on this one. I will update you as soon as I hear back from our design team.

    Thanks

    David 

  • Michael

    Below is the script I am using

    1. RegAddress '0456'='0608'
    2. RegAddress '0411'='0813' 
    3. RegAddress '0416'='08A0' 
    4. RegAddress '0170'='7C12' 
    5. RegAddress '0173'='0D07'
    6. RegAddress '0175'='1004' 
    7. RegAddress '0178'='0002' 
    8. RegAddress '001E'='8000' 

    It looks like the write to address 0x190 is not correct and needs to be fixed. Can you run the above script and see if it works on your side?

    Thanks

    David

  • Hi David,

    Only a small portion of the values ​​are accepted. Attached is the script I used and the output below.
    I tested for 0x0170 # 0x4XXX (Transmit on A, Receive on A: 0x170[14:13] = 2’b10). No difference between Open or Short.

    It looks like the write to address 0x190 is not correct and needs to be fixed. 
    Does this mean that the Ethernet Phy can't be used for TDR at this point? Or is there a workaround?

    Best regards,
    Michael


    #!/bin/sh

    cable_diagnostic() {
    echo "Configure TDR for 0..10m"
    phytool write eth0/0x0/0x0456 0x0608
    phytool write eth0/0x0/0x0411 0x0813
    phytool write eth0/0x0/0x0416 0x08A0
    phytool write eth0/0x0/0x0170 0x7C12
    phytool write eth0/0x0/0x0173 0x0D07
    phytool write eth0/0x0/0x0175 0x1004
    phytool write eth0/0x0/0x0178 0x0002
    phytool write eth0/0x0/0x001e 0x8000

    sleep 1

    echo "Read back values"
    printf "0x0456: "; phytool read eth0/0x0/0x0456
    printf "0x0411: "; phytool read eth0/0x0/0x0411
    printf "0x0456: "; phytool read eth0/0x0/0x0416
    printf "0x0190: "; phytool read eth0/0x0/0x0190
    printf "0x0173: "; phytool read eth0/0x0/0x0173
    printf "0x0175: "; phytool read eth0/0x0/0x0175
    printf "0x0178: "; phytool read eth0/0x0/0x0178
    printf "0x001e: "; phytool read eth0/0x0/0x001e # Should end with 2 for success
    printf "0x0170: "; phytool read eth0/0x0/0x0170 # 0x4XXX -> Transmit on A, Receive on A: 0x170[14:13] = 2’b10

    echo "Result:"
    printf "0x0185: "; phytool read eth0/0x0/0x0185 # Peak is reported if non-zero value:
    printf "0x0180: "; phytool read eth0/0x0/0x0180 # Peak location
    printf "0x018a: "; phytool read eth0/0x0/0x018a # Peak sign
    }

    cable_diagnostic


    #### Output:

    Configure TDR for 0..10m
    Read back values
    0x0456: 0x0120
    0x0411: 0x0813
    0x0456: 0x0120
    0x0190: 0x0002
    0x0173: 0x0807
    0x0175: 0x0000
    0x0178: 0x0002
    0x001e: 0x0102
    0x0170: 0x0002
    Result:
    0x0185: 0x0000
    0x0180: 0x3100
    0x018a: 0x0100




  • Michael

    To double check, these are extended access registers. Did you use the below procedure to write to these extended access registers?

    Thanks

    David

  • Hi David,

    Thanks for the tip. With the adjustment, the read and write functions work! Unfortunately, I've noticed that the measurement isn't 100% reliable.

    Open line:
    - During an AA measurement, a short was detected in 30 out of 1,000 measurements.
    - When AA and BB measurements are performed consecutively, a short is detected on both channels in 2 out of 3,000 measurements.

    Is there any way to tune the parameters so that an open line end is always detected as open and a short as short?

    Best regards,
    Michael

  • Michael

    In DP83825, you are able to store 5 faults location. 0x180 represent the closest fault location on the cable. If customer is only seeing one location of open or short in the cable, only 0x180 will update.

    Here is the detail calculation after you read the register 0x180 registers to get the fault location. Does this help improving the TDR accuracy?

    Thanks

    David

  • Hi David,

    My problem isn't the fault location, but the fault type. An open wire end is occasionally detected as a short circuit. Is there any way to improve the measurement?

    e.g. a 1.5m open cable end is detected as shorted in 1.43m.

    Best regards,

    Michael

  • Michael

    Please see the table below, you can use both peak and sign to detect an open. If there is a peak and the sign is 0, then it is an open. I also believe there is a typo for TX = A and RX = A, for cross short, the sign should be 1, not 0.

    Thanks

    David

  • Hi David,

    That's exactly what I did. To detect a short, I checked for a peak and whether the sign was equal to 1'b1. I repeated the same for the AA and BB measurements. However, occasionally I measure a short with the cable open. It happens for different cable lengths.

    Can I tune other settings? Do we have to pay attention to timings, e.g. before or after configuring / measuring?

    Best regards,

    Michael

  • Hi Michael,

    David is currently on travel so his response may be delayed. I will help to support this thread in the meantime. Please allow me until tomorrow to familiarize with this debug and provide a response.

    Best,

    Shane

  • Hi Michael,

    Here is my understanding of the problem, let me know if I've misunderstood anything:

    It seems like you're seeing the Peak correctly, however the 'peak_polarity_1' bit is occasionally set incorrectly. This would indicate a short in the cable and should not be set if you are testing with an open cable.

    For the AA measurement on an open cable, you see a short incorrectly detected in 30 out of 1000 measurements

    When consecutively running AA and BB measurements on an open cable, you see a short incorrectly detected in 2 out of 3000 measurements.

    Can I tune other settings? Do we have to pay attention to timings, e.g. before or after configuring / measuring?

    You need to check that the TDR is complete before measuring the polarity bit. Are you sure that 0x001E bit 1 is set before reading the polarity bit?

    Additionally, is 0x001E bit 0 set or not when you read the polarity bit? If this bit is set, it means the TDR has failed and the result will not be valid:

    Best,

    Shane

  • Hi Shane,

    It seems like you're seeing the Peak correctly, however the 'peak_polarity_1' bit is occasionally set incorrectly. This would indicate a short in the cable and should not be set if you are testing with an open cable.

    Exactly!

    For the AA measurement on an open cable, you see a short incorrectly detected in 30 out of 1000 measurements

    When consecutively running AA and BB measurements on an open cable, you see a short incorrectly detected in 2 out of 3000 measurements.

    We tested other boards with opther dp83825i Eth-Phy's and various cable lengths: 0m, 0.5m, 1m, and 5m. There's no systematic pattern behind this how often it happens. It seems almost random when an OPEN is detected as a SHORT. The 0.5m cable length is particularly susceptible.

    You need to check that the TDR is complete before measuring the polarity bit. Are you sure that 0x001E bit 1 is set before reading the polarity bit?

    Additionally, is 0x001E bit 0 set or not when you read the polarity bit? If this bit is set, it means the TDR has failed and the result will not be valid:

    I am sure 0x001E bit 1 is set and there is no error.


    Furthermore I also tracked the cable fault location for the 0.5m cable CDLRR1 (0x0180) is either 0x007 or 0x008. Using the calculation from the snla330a.pdf gives me: (DV-7) / 1.3 -> 0m or 0.77m. The formula from David gives me negative values. I think it is not usable for short ranges.

    I also tracked the Amplitude peak register 0x0185: There is no continuity. The value fluctuate greatly.

    Can you say how reliable the TDR measurement is (in %)? We suspect that false reflections are being detected or that there is crosstalk. We have used TDR with other Eth-Phys from different manufacturers and have not observed these effects before.


    Best regards,

    Michael

  • Hi Michael,

    I'm seeing in this previous E2E thread that the accuracy of the built-in TDR decreases at shorter cable lengths. It sounds like you're testing cables from 0.5m to 5m, which would be relatively short. Out of curiosity, do you notice better results when testing cables greater than 10m?

    Best,

    Shane

  • Hi Shane,
    I repeated measurements for 10m, 20m, and 30m cable lengths. No improvement is noticeable. After a few attempts, a short is detected on an open cable. However, we noticed that the behavior of the Eth-Phys differs. On my colleague's board, it happens much faster/more frequently.

    Here are the results after <10 measurements each. AA is measured (max. 5 times) and then BB (max. 5 times). If a short is detected on both channels, this is printed to the console.

    10m cable:

    Start DP83825I short check
    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0021
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0023
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0027
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0021
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0020
    Peak Sign (0x018a): 0x0800
    Short detected on AA
    Peak Location: 0x0180:0x0007 -> 0m

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x003a
    Peak Sign (0x018a): 0x0800
    Short detected on BB
    Peak Location: 0x0180:0x0007 -> 0m
    Short detected on AA and BB

    ---

    20m cable:

    Start DP83825I short check

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x003b
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x003b
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x003a
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0039
    Peak Sign (0x018a): 0x0800
    Short detected on AA
    Peak Location: 0x0180:0x0007 -> 0m

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0020
    Peak Sign (0x018a): 0x0800
    Short detected on BB
    Peak Location: 0x0180:0x0007 -> 0m
    Short detected on AA and BB

    ---

    30m cable:

    Start DP83825I short check

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0026
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0020
    Peak Sign (0x018a): 0x0800
    Short detected on AA
    Peak Location: 0x0180:0x0007 -> 0m

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0027
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0026
    Peak Sign (0x018a): 0000

    TDR Status (0x001e): 0x0102
    Peak Amplitude (0x0185): 0x0020
    Peak Sign (0x018a): 0x0800
    Short detected on BB
    Peak Location: 0x0180:0x0007 -> 0m
    Short detected on AA and BB

    Best regards,

    Michael

  • Michael

    Please give me couple days and let me discuss this internally to see if we can improve the TDR result.

    Thanks

    David

  • Hi David,

    Any update for us?

    Best regards,

    Michael

  • Michael

    We are still discussing this internally and I will update you as soon as possible.

    Thanks

    David