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.

IND-COMMS-SDK: How to avoid stacking in MDIO read or write section

Part Number: IND-COMMS-SDK
Other Parts Discussed in Thread: AM2432, , DP83869

Tool/software:

Hi team,

I develop EtherCAT slave application of IND-COMMS-SDK for AM243x, with AM2432 + dp83822.

I am experiencing a loop or stuck state when reading MDIO for the first time.

I believe this is a hardware issue (unstable voltage on MDIO),

but is it possible to reset the PHY  when it gets stuck?

Best regard,

Oyama

  • Hi,

    I am experiencing a loop or stuck state when reading MDIO for the first time.
    • Are you reading using the MDIO APIs? Where is it getting stuck? Is the PHY up when the MDIO tried to read (at least PHY registers coming up)?
    but is it possible to reset the PHY  when it gets stuck?
    • Yes this is possible. You can toggle the GPIO pin connected to the PHY Reset pin and check PHY Register BMCR via MDIO to ensure it's ready after reset.

    If you could give more details on the issue you're seeing, I can cross-check for the same from my side.

    Regards,
    Aaron

  • Hi Aaron,

    Freezing does not occur often, and MDIO will recover within tens of seconds.

    The freeze occurs when CUST_PHY_readReg() or CUST_PHY_writeReg() is called early in CUST_PHY_dp83869.c.

    (In fact, the contents of CUST_PHY_dp83869.c have been rewritten for the dp83822.)

    When the program is frozen, if I connect JTAG, it always stops at the following function.

    This is in a library, so the exact location is unknown.

    The cause of MDIO instability is unknown for now.

    Best regard,

    Oyama

  • Hello Oyama,

    Freezing does not occur often, and MDIO will recover within tens of seconds.

    Is that the program starts (MDIO_phyRegWrite / MDIO_phyRegRead function returns) to work again after tens of seconds?

    The freeze occurs when CUST_PHY_readReg() or CUST_PHY_writeReg() is called early in CUST_PHY_dp83869.c.

    What exactly you mean 'early' called?

    Did you try resetting or power down the PHY? 

    Kind Regards,

  • Hi Harsha,

    Is that the program starts (MDIO_phyRegWrite / MDIO_phyRegRead function returns) to work again after tens of seconds?

    "Freezing" means that the program goes into the while() loop and doesn't get out of the while() loop for a long time.

    What exactly you mean 'early' called?

    The exact location of the freeze is unknown. Once the program is out of the freeze state, it will not freeze again.

    Best regard,

    Oyama