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.

AM6442: Custom Phy Integration Problem

Part Number: AM6442
Other Parts Discussed in Thread: DP83640

Hello,

I'm trying to establish an ethernet connection to my "custom board" with a dp83640 model phy. I followed the "Ethernet PHY Integration Guide" and "Custom Board Support" guides in mcu_plus_sdk. I'm testing with the lwip_icssg example. I got these errors:

1-) EnetPhy_readReg:                       PHY1: failed to read reg 0 : -1
2-) EnetphyMdioDFLT_readC22:       PHY1: failed to read reg 0 : -1
3-) EnetMod_ioctl: icssg1-1.mdio:     failed to do IOCTL cmd 0x01000605 :-1

Waiting for your helps.

Regard,

Berlam

  • Btw when i enable strapped mode , example seems running correect. I get linkup and linkdown information based on cable state. But i dont receive or send any data.

    Best Regards,

    Berlam

  • Hi Berlam,

    Thanks for your query.

    I will check it internally. Please allow me a couple of days to get back to you.

    Best Regards

    Ashwani

  • Hi Berlam,

    Can you please give me some more background of the issue ?

    1. You are using AM64x-HSFS board. correct ?
    2. MDIC and MDIO pins are muxed correctly ?
      • Same pins (Y6, AA6) as shown below snapshots
    3. Are you able to call mdio APIs without custom PHY driver code integration  ?

    Best Regards

    Ashwani

  • Hi Ashwani,

    1. I am using GP device not HSFS.

    2. Yes, our pins are muxed correctly.

    3. Actually i dont know that i am able to or not.

    Is there any chance that you can make a more detailed Phy driver integration than mcu_plus_sdk ?

    Best Regards

    Berlam

  • Hi Berlam,

    Thanks for inputs.

    Is there any chance that you can make a more detailed Phy driver integration than mcu_plus_sdk ?

    Let me check and get back to you.

    Best Regards

    Ashwani

  • Hi Berlam,

    Which SDK version you are working on ?

    Best Regards

    Ashwani

  • Hi Ashwani

    I am working on 08.04 version and tested on 08.05 version by the way.

    Best Regards

    Berlam

  • Hi Berlam,

    Thanks for info.

    Can you please add below function (test code) in application and update the results / output ?

    Note: You need to add in the application code. you can call it in the app main  after driver open

    Save New Duplicate & Edit Just Text Twitter
    #include <kernel/dpl/ClockP.h>
    
    /*! \brief PHY Basic Mode Status Register (BMSR) */
    #define PHY_BMSR (0x01U)
    void Enet_MdioPhyAddrScan(Enet_Type enetType, uint32_t instId)
    {
        EnetApp_HandleInfo handleInfo;
        EnetApp_acquireHandleInfo(enetType, instId, &handleInfo);
    
        Enet_IoctlPrms prms;
        uint16_t val = 0;
        EnetMdio_C22ReadInArgs inArgs;
        inArgs.group = ENET_MDIO_GROUP_0;
        inArgs.reg   = PHY_BMSR;
    
        int32_t status;
    
        EnetAppUtils_print("PHY scan start\r\n");
        for (uint32_t phyAddr = 0; phyAddr < 32; phyAddr++)
        {
            inArgs.phyAddr = phyAddr;
            val = 0;
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &inArgs, &val);
            ENET_IOCTL(handleInfo.hEnet, EnetSoc_getCoreId(), ENET_MDIO_IOCTL_C22_READ, &prms, status);
    
            if (status == ENET_SOK)
            {
                EnetAppUtils_print("PHY found at addr: %d, val: 0x%x\r\n", inArgs.phyAddr, val);
            }
            else
            {
                EnetAppUtils_print("NO PHY found at addr: %d\r\n", phyAddr);
            }
            ClockP_sleep(1);
        }
        EnetAppUtils_print("PHY scan completed\r\n");
    }

    Best Regards

    Ashwani