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.

LP-AM261: Issue with EtherCAT Example Using Single Ethernet Add-on Board

Part Number: LP-AM261
Other Parts Discussed in Thread: DP83826E

Tool/software:

Hi,
I am currently working with LP AM261x using the SDK version ind_comms_sdk_am261x_10_02_00_17, specifically the EtherCAT SubDevice Beckhoff SSC Demo example. I have encountered an issue when trying to run the example with only one Ethernet Add-on Board connected.
Setup details:
    PHY: Ethernet Add-on connected only at ETHERNET CONNECTOR 0
    ETHERNET CONNECTOR 1: left empty (no PHY)
    syscfg configuration snippet:
    const ethercat        = scripting.addModule("/industrial_comms/ethercat/ethercat", {}, false);
    const ethercat1       = ethercat.addInstance();
    
    ethercat1.name              = "CONFIG_ETHERCAT0";
    ethercat1.ethphy[0].$name    = "CONFIG_ETHPHY0";
    ethercat1.ethphy[0].name     = "DP83826E";
    ethercat1.ethphy[0].mdioPort = 1;
    ethercat1.ethphy[1].$name    = "CONFIG_ETHPHY1";
    ethercat1.ethphy[1].mdioPort = 3;
    ethercat1.ethphy[1].name     = "NONE";

    EtherCAT master: Beckhoff CTT tool connected to PORT0

Problem:
    When both PHYs are mounted (on ETHERNET CONNECTOR 0 and 1), the EtherCAT Subdevice example works perfectly.
    However, when the PHY on ETHERNET CONNECTOR 1 is removed, the EtherCAT master cannot detect the subdevice.

Has anyone experienced a similar issue or can provide advice on how to configure the example or syscfg properly to support operation with only one PHY connected? Is it necessary to modify the example or SDK settings to disable or remove the second Ethernet interface completely? Or is there a hardware or driver dependency that requires both PHYs to be present?

  • Hi,

    Thank you for the details.

    Since PHY is not connected to ETHERNET CONNECTOR1, you will have to take care of the CONFIG_ETHPHY1 initializations (comment out the configurations for the unused PHY) in {ICSDK_INSTALL_DIR}\examples\industrial_comms\ethercat_sulave_beckhoff_ssc_demo\am261x-lp\tiescsoc.c file. 

    There is a check in tiesc_ethphyEnablePowerDown() which makes sure that PHY register access is working by checking the Identifier register. Since PHY corresponding to CONFIG_ETHPHY1 is removed, this check will fail and will be stuck in while loop, which I suspect is happening in your case. Make sure to remove this check as below:

    void tiesc_ethphyEnablePowerDown()
    {
        /*TODO: Need to enable the mux selection from the generated files*/
        /* Ensure that PHY register access is working by checking the Identifier register */
        while(SystemP_SUCCESS != ETHPHY_command(gEthPhyHandle[CONFIG_ETHPHY0], ETHPHY_CMD_VERIFY_IDENTIFIER_REGISTER, NULL, 0));
        /* Comment out this check for Port1 */
        //while(SystemP_SUCCESS != ETHPHY_command(gEthPhyHandle[CONFIG_ETHPHY1], ETHPHY_CMD_VERIFY_IDENTIFIER_REGISTER, NULL, 0));
    
        /* Enable IEEE Power Down mode so that PHY does not establish any link */
        ETHPHY_command(gEthPhyHandle[CONFIG_ETHPHY0], ETHPHY_CMD_ENABLE_IEEE_POWER_DOWN, NULL, 0);
        ETHPHY_command(gEthPhyHandle[CONFIG_ETHPHY1], ETHPHY_CMD_ENABLE_IEEE_POWER_DOWN, NULL, 0);
    }

    Do let me know if this helps your current issue.

    Regards,
    Aaron

  • Hi,

    Thank you for your reply.

     

    I had already commented out all settings for CONFIG_ETHPHY1 in tiescsoc.c because otherwise the project wouldn’t compile. However, this alone does not seem to be sufficient.

    The initialization appears successful—Board_ethPhyOpen() returns a success status, and the application runs in the main loop. Despite this, the EtherCAT main device (Beckhoff EtherCAT CTT) still does not detect the device.

    Could this issue be related to the PRU firmware? The current firmware provided in the example is designed for 2x MII ports (one IN and one OUT), which rely on two PHYs. Might it require modification to support our setup?

     

    Thank you for your guidance.

  • Hi,

    The initialization appears successful—Board_ethPhyOpen() returns a success status, and the application runs in the main loop.

    Thank you for the clarification.

    Could this issue be related to the PRU firmware? The current firmware provided in the example is designed for 2x MII ports (one IN and one OUT), which rely on two PHYs. Might it require modification to support our setup?

    The default firmware should work for 1 port scenario also. Additionally, you will need to set the link polarity (TIESC_LINK1_POL) of the unused port to HIGH (the unused port link polarity should be configured to the opposite)

    Regards,
    Aaron

  • Hi Aaron,

    I set TIESC_LINK1_POL = TIESC_LINK_POL_ACTIVE_HIGH (i.e., 0) and it works now. The Main device finds and connects to the SubDevice. 

    Thank you very much for the support.

    Regards,

    Krasimir