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.

DP83848-EP: Internal Loopback not working sometimes

Part Number: DP83848-EP

Sometimes, after enabling Internal Loopback, the message sent is not received. I am unable to disconnect the external cable when running the loopback test. I suspect this may be causing it to not work sometimes. What is proper sequence to guarantee Internal loopback will work when unable to disconnect external cable?

  • It is my understanding that the internal loopback should be independent of the external media. It should not be necessary to disconnect for this test.
    Have you reviewed the timing diagrams for loopback in the datasheet?
    Does this happen on more than one board/device?
    What mode are you running? 10 or 100Mbps?
    Can you probe timing on the MII interface to see if the RX is sending data back?

    I will do some additional research to see if I can gets some additional ideas on debugging.

    Regards,
    Wade
  • Yes, I have reviewed the timing diagrams for loopback. They do not specify how long to wait after enabling loopback to send a message. I currently have a 500 msec delay between the loopback enable and the sending of the message.

    It does happen on more than one board/device.

    It is configured for 100Mbps.

    I don't have access to the MII interface signals. It is integrated in a closed system.

  • Hi user,

    What value are you sending to register 0x00 to enable internal loopback mode? To enable MII loopback in 100base-tx mode, set register 0x0 = 0x6100.

    You should disable autonegotiation as shown in the datasheet when internal loopback is desired.

    The timing diagram shows you should wait 550us after setting internal loopback before sending a frame, in 100base-tx mode. 10base-t does not have the scrambler/descrambler delay.

    Does your normal data through the cable work and only loopback modes are affected? Or have you not tried external data yet?

    Best Regards,
  • Hi Rob,

    I am setting register 0x0 = 0x6100.

    Normal/external data does go through the cable. For Loopback mode, we have a requirement to turn it on and verify it is working upon request. Sometimes it works, but other times it does not.

  • Unfortunately, this is not enough information to help diagnose the issue.
    If you can get the MII exposed, probing this could yield some insights.

    When it does not work, is there any pattern? Ie, first packet fails, then passes? Or, when fails all packets fail?

    Regards,
    Wade
  • Only one message is sent each time Loopback is enabled. When it does not work, the message is never received. I have added additional checks of the PHY Status Register after enabling loopback and before sending the message. Before sending the message I verify that Signal Detect, Descrambler Lock, Loopback Status, and Link Status bits are all set PHY status register. When it fails, the PHY Status register does not have the Descrambler Lock bit set. This is my test sequence which I have in a loop to repeat every 5 seconds. Initialization of the Ethernet interface is complete before these steps.

    1. Enable PHY Loopback

    2. Wait 550 usec

    3. Verify that Signal Detect, Descrambler Lock, Loopback Status, and Link Status bits are all set PHY status register

    4. Send UDP message

    5. Wait the Receive Interrupt

    6. Process Received Message