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.

ethernet phy bist control (loopback test mode)

Dear Sir / Madam

As a hardware engineer I would like to measure the Ethernet performance. The idea is to use the loopback function. The intention is to perform an external loopback test reading the error count. Our software engineer has difficulties in setting up the external ethernet loopback test. Can you tell me what the preconditions are.

 

Thanks in advance

  • Hello Marthijn,

    To perform the Ethernet PHY Bist, the following must be the steps

    1. Ensure that you have a 25MHz crystal and then configure the system for 120MHz System Clock with the MOSC providing the clock to the MAC+PHY using the EMACCC register

    2. Enable clocking to Ethernet MAC and PHY, for which you can refer to the enet_uip example

    3. Use the Ethernet Function to access the BIST Control register.

    4. Perform the test and then Check the BIST Status register.

    Regards

    Amit

  • Hi Amit

    Thanks the registers are written, but I think the auto negotiation is corrupting the test. So we disabled this. Now I see loopback data sent. But the error counter is not runing. Even when I corrupt the data the error counter is stil zero.

    What are the settings to enable the error counter.

     

    Marthijn

  • Hello Marthijn,

    Do you mean the PRBS error counter in Ethernet PHY BIST Control and Status 1 - MR27 (EPHYBICSR1),
    address 0x01B?

    Regards

    Amit

  • Hi Amit,

    Yes the error counter as described in your reply.

     

    Marthijn

  • Hello Marthijn

    Before reading it you must first write 0x3 to lock and clear counters, than you should read it (you can also only lock it).

    Regards

    Amit

  • Hi Amit,

    The following values are written

    BISTCR (0x16) written 0x7000

    BMCR (0x000) written 0x0100

    to read the error count software writes:

    BICSR1 (0x01B) written 0x8000. bit 15 as described:

    on page 1648 of teh TM4C1294 data sheet.

    I see errors only if a corrupt the data using a wrong "load" at the external loopback.

    Question: Can you be a bit more specifiek which register is written using the 0x3. And do you advice a different routine as descibed above

    Regards Marthijn

  • Hi Amit,

    Question: do we need to disable auto negotiation. Know software has disabled it.

    secondly I would like to give a bit more feedback on this issue. Hopefully this will give you a better view.

    When I use an external cable (100metres) and create the external loopback, so effectivily 200 metre, I read 0x73 (BISTCR). PRBS checker not locked.I will repeat the test with 100metre loopabck (cutting the cable ad 50 metre) and repeat the test, maybe 200 metres is to much. The communication between the computer and my device under test using 100 meter seems to works fine. I use wireshark as sniffer and see retransmitted data. The retransmit is perfomred by the Tiva witout a request. It seems that the Tiva respons is to quick. Is that something I can change?

     

    Hope to hear from you soon.

    marthijn 

  • Hello Marthijn

    Please correct me if I am wrong in my understanding

    1. When doing the loopback testing, and with 100 meters cable the PRBS checker does not lock and gives error? or does it not lock and does not give error

    2. What is the re-transmit between the PC and TM4C129. Is it still test mode or functional mode?

    Regards

    Amit

  • Amit

    This doesn't work. It takes to long and Im not pleased. Where running a project here and I do not have alle the time.

    Please read my post agian. I think you have skipped one.

    The eye pattern looks good but the loopback function shows error when using 10 meter cable, so effectivily 20 meters. when I use the hundred meter cable the prbs counter does not lock. That means 200 meter cabel between Tx and RX. That was to much. So a reduced the cable to 50 meters, 100 meter cable in loopback. 

    20 meter: BISTCR 0x7F00 & BICSR1 0x2100

    100 meter BISTCR 0x7F00 & BICSR1 0x4400 Error value varies.

    The loopback measurment is intitiated by writing.

    0x7000 and 0x2100 to respectiviy BISTCR and BMCR 

    When using the hunderd meter cable between the computer and DUT the communication is good. I do not see retransmits using a packet sniffer (wireshark) The .EYE pattern is also good. So why do I see errors. My conclusion is or we have a wrong setting or the Tiva makes sync errors.

    What kind of frames are used during lookback, or is it just a continious bit stream without sync word etc etc.

    What are the accect setting needed for a good external loopback test.

     

    Marthijn