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.

AM2634: Using 10/100 phy with CPSW MAC port 2

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Hi,

In the extension of previously asked question: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1192229/am2634-using-10-100-phy-with-cpsw-mac-port-2/4494359#4494359

If enable only MAC port 2 then the firmware crashes

To use MAC port 2 I had to enable MAC port1 as well. MAC port 2 can't be enabled alone?

When external phy management is enabled with MAC port 1and MAC port 2 enabled then no communication on MAC port2(J4), what could be the issue?

I am using mcu_plus_sdk_am263x_08_06_00_34, enet_lwip_cpsw_am263x-cc_r5fss0-0_freertos_ti-arm-clang example code. And using PROC110E2 eval board.

Thanks

Baljeet

  • Hi Balijeet,

    Let me get back on this by early next week.

  • Hi Baljeet, 

    For further analysis, can you please share your project binary and example.syscfg file.

    Also, just to be aligned, have you made any changes to the source code, or you are facing this issue directly in the out-of-box SDK example.

    ~Shaunak

  • Hi Baljeet, 

    This is a known bug and has been taken up for fixing.

    Incase, If you wish to use a workaround for now, you can follow the steps:

    1. In syscfg, disable MAC Port-1, keep MAC port-2 enabled

    2. In case you have 2 Netif instances, delete one instance in syscfg.

    3. In ti_enet_open_close.h, comment the following line 

    EnetAppUtils_assert(portIdx < ENET_SYSCFG_MAX_MAC_PORTS);

    4. Rebuild the project

    Note: This is just a simple workaround which hasn't been robustly tested and TI or MCU_PLUS_SDK doesn't guarantee the proper functionality. You can proceed with using the workaround or wait for the Official fix in the SDK.

    Regards,

    Shaunak

  • Hi Shaunak,

    The line of code is in ti_enet_open_close.c, but this file is generated automatically on every compilation. So commenting this line does not works.

    Find attached sysconfig and binary file. The board is configured with static IP 192.168.11.200, 255.255.255.0

    ti.zip

    Thanks

    Baljeet

  • Hi Baljeet,

    Thanks for sharing the sysconfig file and the output binary.

    To avoid the file being re-generated on every compilation, you can comment the same line in the template ".xdt" file. (please refer to the image attached)

    File Path: SDK_INSTALL_PATH/source/networking/.meta/enet_cpsw/templates/enet_app_cpsw_cfg.c.xdt

    Next, rebuild the enet-cpsw library, scrub and rebuild the enet_lwip_cpsw example,

    Since the ti_enet_open_close.c is generated from the .c.xdt template file, we modified the template file itself. Reminding again that this is just a temporary workaround and not the official fix.

    - Shaunak

  • Hi Shaunak,

    I have made the changes in enet_app_cpsw_cfg.c.xdt and it does generate the required code. But even after commenting

    //EnetAppUtils_assert(portIdx < ENET_SYSCFG_MAX_MAC_PORTS);
    in ti_enet_open_close.c no ping. The firmware hangs.

    It works when External Phy Management is disabled. We need to add custom phy on MAC2 so we need external phy management enabled.

    Thanks

    Baljeet

  • Hi Baljeet, do you observe this behavior without changing the source code of any library or example (out of box SDK)??

    ~ Shaunak

  • Hi Shaunak,

    The behavior is different in out of the box SDK. In out of the box SDK, firmware never hangs.

    Thanks

    Baljeet

  • Hi Baljeet, 

    Integrating custom PHY would be much easier than having to handle external PHY and the known issues.

    Can you please try your changes with custom PHY rather than External PHY integration.

    External Phy management need not be enabled for custom Phy integration 

    Please let me know if you encounter any problems with Custom PHY integration.

    Custom PHY integration guide:AM263x MCU+ SDK: Ethernet PHY Integration Guide

    Shaunak