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-AM243: Run enet_lwip_cpsw_am243x-lp_r5fss0-0_freertos_ti-arm-clang on second PHY of LP-AM243

Part Number: LP-AM243
Other Parts Discussed in Thread: SYSCONFIG

I believe that the PHY (address 3, left RJ45) is broken on my LP-AM243: LEDs remain dark after connecting cable, example code spits out

Mdio_normal_ioctl_handler_ENET_MDIO_IOCTL_C22_ASYNC_READ_COMPLETE: failed to read PHY 3 C22 reg 1: 1
EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x0100060a: 1

Is there a way to make the example work by using only the other PHY (address 15)? I use SDK version 8.05.

I tried to disable the first MAC in Sysconfig:

But now I get

==========================
      ENET LWIP App       
==========================
Enabling clocks!
Assertion @ Line: 1632 in syscfg/ti_enet_open_close.c: portIdx < ENET_SYSCFG_MAX_MAC_PORTS : failed !!!

on the console.

Best Regards

Johannes

  • Hi Johannes,

    We will try this example on our end, to reproduce the issue. Let me get back by wednesday on this.

    BR

    Nilabh A.

  • Hi Nilabh,

    did you find the time to have look into this?

    Best regards

    Johannes

  • Hi Johannes,

    Apologies for not being able to get back here. I will get back by EOD today.

  • Hi Johannes,

    We have been able to reproduce the issue. This will be fixed in next sdk release.

    https://jira.itg.ti.com/browse/MCUSDK-9659 (internal view only)

    For time being you can use following work around to get unblocked:

    1. In file source\networking\.meta\enet_cpsw\templates\enet_syscfg.h.xdt

    modify #define ENET_SYSCFG_MAX_MAC_PORTS         (`Number((module.getCpswInstInfo(instance)).numMacPorts)`U)

    to  #define ENET_SYSCFG_MAX_MAC_PORTS      2U

    This should help in by pass the check.

    Please let me know if you need any help

    BR

    Nilabh A.

  • Hi Nilabh,

    thank you for taking the time looking into this. I tried what you suggested but without success.

    Meanwhile I have received a new LP where I expect both MAC ports to work. With the left RJ45 and without the suggested modification in source\networking\.meta\enet_cpsw\templates\enet_syscfg.h.xdt, the lwIP example seems to work:

    ...

    Mdio_normal_ioctl_handler_ENET_MDIO_IOCTL_C22_ASYNC_READ_COMPLETE: failed to read PHY 3 C22 reg 9: 1
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x0100060a: 1
    Mdio_normal_ioctl_handler_ENET_MDIO_IOCTL_C22_ASYNC_READ_COMPLETE: failed to read PHY 3 C22 reg 10: 1
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x0100060a: 1
    Starting lwIP, local interface IP is dhcp-enabled
    Host MAC address-0 : 3c:e0:64:62:e2:d4
    [LWIPIF_LWIP] NETIF INIT SUCCESS
    [LWIPIF_LWIP] Enet has been started successfully
    status_callback==UP, local interface IP is 0.0.0.0
    UDP server listening on port 5001
    link_callback==UP
          8.905s : CPU load =   0.00 %
         13.905s : CPU load =   2.18 %
         18.905s : CPU load =   2.17 %
         23.905s : CPU load =   2.17 %
         28.905s : CPU load =   2.17 %
         33.905s : CPU load =   2.18 %
    link_callback==DOWN
    link_callback==UP
         38.905s : CPU load =   2.19 %
         43.905s : CPU load =   2.18 %
         48.905s : CPU load =   2.18 %

    even though the plentitude of messages from Mdio_normal_ioctl_handler and EnetMod_ioctl that comes before starting lwIP looks a bit frightening  to me.

    With the suggested modification to source\networking\.meta\enet_cpsw\templates\enet_syscfg.h.xdt, first MAC port (PHY address 3) disabled in Sysconfig, and cable plugged into the right RJ45, the last console messages are:

    Mdio_normal_ioctl_handler_ENET_MDIO_IOCTL_C22_ASYNC_READ_COMPLETE: failed to read PHY 15 C22 reg 9: 1
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x0100060a: 1
    Mdio_normal_ioctl_handler_ENET_MDIO_IOCTL_C22_ASYNC_READ_COMPLETE: failed to read PHY 15 C22 reg 10: 1
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x0100060a: 1
    Starting lwIP, local interface IP is dhcp-enabled
    Host MAC address-0 : 3c:e0:64:62:e2:d4

    and when I stop the core it hangs in

    As the suggested solution doesn't seem to work with a new LP it doesn't make sense to try it with an LP where the address 3 PHY is broken.

    If you have any further suggestions, please let me know!

    Best regards

    Johannes

  • Hi Johannes

    Let me get back on Tuesday with more findings. Also did you try on your newLP board