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.

DP83848K: Not detecting link down when ethernet switch is forcing link speed to transceiver

Part Number: DP83848K

I have been testing a product using the DP83848K transceiver to transmit TCP/UDP data for process monitoring, and I have been running into an issue when forcing network speed via an ethernet switch.

The transceiver is configured to auto-negotiate link speed and duplex mode. The microcontroller that interfaces with the transceiver has a dedicated thread that reads the BMSR register (0x01) to determine if the link is down or up (Bit 2 Link Status 0 or 1, respectively). If the link goes down, then the MAC interface is disabled until the link comes back up (Link Status set to 1), at which point auto-negotiation is started to determine link speed and duplex mode, which is used to configure the MAC interface. 

When initially connecting the DUT to the network or after power cycling the DUT, communication proceeds as expected. Additionally, if the switch is changed from auto-negotiate to forced 10M or 100M, the DUT responds to the change in speed. However, if the switch is set to force 10M speed and is then set to force 100M speed, communication is lost and the switch reports that the link is down. It is possible to recover communciation, but it requires either power cycling the DUT, forcing network speed back to 10M, or setting the switch back to auto-negotiation. Operating the microcontroller in debug mode, when the network speed is forced from 10M to 100M, the BMSR register never reports that the link goes down, so the DUT never reconfigures the MAC interface. 

Is there a reason why the transceiver never reports a link down state when forcing network speed from 10M to 100M operation and can this fixed? Alternatively, is there a better way of determining that the MAC needs to be reconfigured? 

  • Hello Christopher,

    The Link Status bit in the BMSR register is a latched register. This bit will not change unless read, and read again to see the change. An alternate Link Status is provided on bit 0 of the PHYSTS register 0x10. I would try to base your functionality on this register and see if the issue is resolved. If this gives you the same issue please let me know and we can investigate further.

    Thanks,

    Vibhu

  • Hello Vibhu, 

    Thank you for the fast response. 

    Changing from the basic register to the extended register (from 0x01 to 0x10) results in the same issue. 

  • Hello Christopher,

    Is the switch starting an auto-negotiation process with the PHY? Can you see if you see the same issue when using two DP83848s and changing the speed on one, to see if the link changes between 10M and 100M?

    Thanks,

    Vibhu

  • Vibhu, 

    Is the switch starting an auto-negotiation process with the PHY?

    No, when the switch forces a network speed, this disables auto-negotiation on the switch. The speed is assumed since speed is forced.

    Can you see if you see the same issue when using two DP83848s and changing the speed on one, to see if the link changes between 10M and 100M?

    I will run some tests and see what I can determine. 

  • Vibhu, 

    I setup a development board that uses a DP83848 transceiver to interface with the DUT. The development board has been programmed with auto-negotiation disabled, where network speed defaults to 100M (written to register BMCR, 0x00). If I press a button on the development board, then the speed toggles between 10M and 100M. Just as I saw with the network switch, when I transition the development board from 10M to 100M, the DUT brings down the link but does not change speed. I have to physically disconnect the cable to get the DUT to detect link down, which allows the DUT to negotiate speed when the cable is reconnected. 

  • Hello Christopher,

    You cannot do this with auto-negotiation disabled. A scenario that would work is both PHYs are in auto-negotiation and link to 100M. Then you force set one PHY to 10M while the other is still in auto-negotiation. When the link drops the PHY will see the link partner sending out 10M idles and set to 10M as well.

    When auto-negotiation is turned off both PHYs will need to be set manually.

    Thanks,

    Vibhu

  • Thank you, Vibhu. You have addressed the issue, and I understand how to proceed.