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-AM263: Inconsistent behavior with LWIP demos

Part Number: LP-AM263

Hello,

My colleagues and I are trying to start working with the networking capabilities of Sitara processors and having some trouble getting the demos up and running. I've had the most success in that I have been able to get the LWIP_CPSW to pull an IP address and was able to run iperf a couple of times. However, most of the times I plug it in I see something similar to this:

[2022-08-24 15:44:20.253] Device Type : HSFS                                                                                                                                                      [74/9503]
[2022-08-24 15:44:20.256] Starting QSPI Bootloader ...                                                                                                                                                     
[2022-08-24 15:44:20.277] [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH                                                                                                                            
[2022-08-24 15:44:20.282] [BOOTLOADER_PROFILE] Boot Media Clock : 80.000 MHz                                                                                                                               
[2022-08-24 15:44:20.286] [BOOTLOADER_PROFILE] Boot Image Size  : 290 KB                                                                                                                                   
[2022-08-24 15:44:20.290] [BOOTLOADER_PROFILE] Cores present    :                                                                                                                                          
[2022-08-24 15:44:20.295] r5f0-0                                                                                                                                                                           
[2022-08-24 15:44:20.296] [BOOTLOADER PROFILE] System_init                      :        788us                                                                                                             
[2022-08-24 15:44:20.301] [BOOTLOADER PROFILE] Drivers_open                     :         33us                                                                                                             
[2022-08-24 15:44:20.308] [BOOTLOADER PROFILE] LoadHsmRtFw                      :        177us                                                                                                             
[2022-08-24 15:44:20.314] [BOOTLOADER PROFILE] Board_driversOpen                :        239us                                                                                                             
[2022-08-24 15:44:20.321] [BOOTLOADER PROFILE] CPU load                         :      16815us                                                                                                             
[2022-08-24 15:44:20.327] [BOOTLOADER_PROFILE] SBL Total Time Taken             :      18055us                                                                                                             
[2022-08-24 15:44:20.334]                                                                                                                                                                                  
[2022-08-24 15:44:20.334] Image loading done, switching to application ...                                                                                                                                 
[2022-08-24 15:44:20.347] ==========================                                                                                                                                                       
[2022-08-24 15:44:20.350]       ENET LWIP App                                                                                                                                                              
[2022-08-24 15:44:20.352] ==========================                                                                                                                                                       
[2022-08-24 15:44:20.354] Starting lwIP, local interface IP is dhcp-enabled                                                                                                                                
[2022-08-24 15:44:20.359] Host MAC address: XX:XX:XX:XX:XX:XX                                                                                                                                             
[2022-08-24 15:44:20.362] [LWIPIF_LWIP] Enet has been started successfully                                                                                                                                 
[2022-08-24 15:44:20.366] [LWIPIF_LWIP] NETIF INIT SUCCESS                                                                                                                                                 
[2022-08-24 15:44:20.370] status_callback==UP, local interface IP is 0.0.0.0                                                                                                                               
[2022-08-24 15:44:20.374] UDP server listening on port 5001                                                                                                                                                
[2022-08-24 15:44:20.554] EnetPhy_bindDriver:1718                                                                                                                                                          
[2022-08-24 15:44:23.654] Cpsw_handleLinkUp:1800                                                                                                                                                           
[2022-08-24 15:44:23.656] MAC Port 1: link up                                                                                                                                                              
[2022-08-24 15:44:23.860] link_callback==UP                                                                                                                                                                
[2022-08-24 15:44:25.376]       5. 28s : CPU load =   1.71 %                                                                                                                                               
[2022-08-24 15:44:30.377]      10. 28s : CPU load =   1.49 %                                                                                                                                               
[2022-08-24 15:44:30.855] status_callback==UP, local interface IP is XXX.XXX.XXX.XXX                                                                                                                       
[2022-08-24 15:44:33.055] Cpsw_handleLinkDown:1826                                                                                                                                                         
[2022-08-24 15:44:33.057] MAC Port 1: link down                                                                                                                                                            
[2022-08-24 15:44:33.155] Mdio_ioctl:420                                                                                                                                                                   
[2022-08-24 15:44:33.157] EnetMod_ioctl:1305                                                                                                                                                               
[2022-08-24 15:44:33.158] EnetPhyMdioDflt_readC22:236                                                                                                                                                      
[2022-08-24 15:44:33.161] EnetPhy_rmwReg:638                                                                                                                                                               
[2022-08-24 15:44:33.255] Mdio_ioctl:420                                                                                                                                                                   
[2022-08-24 15:44:33.257] EnetMod_ioctl:1305                                                                                                                                                               
[2022-08-24 15:44:33.258] EnetPhyMdioDflt_readC22:236                                                                                                                                                      
[2022-08-24 15:44:33.261] EnetPhy_readReg:600                                                                                                                                                              
[2022-08-24 15:44:33.355] Mdio_ioctl:420                                                                                                                                                                   
[2022-08-24 15:44:33.357] EnetMod_ioctl:1305                                                                                                                                                               
[2022-08-24 15:44:33.358] EnetPhyMdioDflt_readC22:236
[2022-08-24 15:44:33.361] EnetPhy_readReg:600
[2022-08-24 15:44:33.363] link_callback==DOWN
[2022-08-24 15:44:33.455] Mdio_ioctl:420
[2022-08-24 15:44:33.457] EnetMod_ioctl:1305
[2022-08-24 15:44:33.458] EnetPhyMdioDflt_readC22:236
[2022-08-24 15:44:33.461] EnetPhy_readReg:600
[2022-08-24 15:44:33.555] Mdio_ioctl:420
[2022-08-24 15:44:33.557] EnetMod_ioctl:1305
[2022-08-24 15:44:33.558] EnetPhyMdioDflt_readC22:236
[2022-08-24 15:44:33.561] EnetPhy_readReg:600
[2022-08-24 15:44:33.655] Mdio_ioctl:420
[2022-08-24 15:44:33.657] EnetMod_ioctl:1305
[2022-08-24 15:44:33.658] EnetPhyMdioDflt_readC22:236
[2022-08-24 15:44:33.661] EnetPhy_readReg:600
[2022-08-24 15:44:33.756] Mdio_ioctl:420

With the Mdio_ioctl and EnetMod  spamming the terminal until I unplug the device. When it is in this state I am no longer able to ping the device.

We are all working remotely from our respective homes, so I believe the issue is software related, not an issue with HW or networking configurations.

Thanks,

Mike

  • Hi Mike,

    Sorry for delay. I will check internally on disabling the diag logs and possible reasons for this issue.

    will get back by Monday.

    Regards,

    Prasad

  • Hi Mike,

    Enet LLD MDIO ioctl doesn't print anything unless there is an error. Looks like PHY read is failing after the link is down.

    The only reason we can see why it would fail is if PHY reg read failed. Is this your custom board or am263x-lp (if LP can you please let us know revision (E1  or E2)? 

    Also, can you please execute in debug build to get more detailed info on failure?

    Regards,

    Prasad

  • Hello Prasad,

    Thanks for getting back to me. We haven't made it to a custom board yet, so this is all on AM263x-LP boards. The silkscreen on mine says PROC11E2, which I presume means it is the E2 revision.

    Running a debug build seems to line up with what you suggest as the error.

    link_callback==UP                                                                                    
    2     10. 28s : CPU load =   2.33 %                                                                  
    Cpsw_handleLinkDown: Port 1: Link down                                                               
    MAC Port 1: link down                                                                                
    Mdio_ioctl: failed to read PHY 3 C22 reg 31: -1                                                      
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x01000605: -1                                    
    EnetPhyMdioDflt_readC22: PHY 3: Failed to read C22 reg: -1                                           
    EnetPhy_rmwReg: PHY 3: Failed to read reg 31: -1                                                     
    Mdio_ioctl: failed to read PHY 3 C22 reg 31: -1                                                      
    EnetMod_ioctl: cpsw3g.mdio: Failed to do IOCTL cmd 0x01000605: -1                                    
    EnetPhyMdioDflt_readC22: PHY 3: Failed to read C22 reg: -1                                           
    EnetPhy_readReg: PHY 3: Failed to read reg 31: -1                                                    
    link_callback==DOWN

    It then rapidly loops through the four lines starting with Mdio_ioctl.

    Thanks,

    Mike

  • It looks like the failing function is CSL_MDIO_phyRegRead2 in csl_mdio.c.

  • Hi Michael,

    Sorry for late response. I was on vacation last week.

    Regarding your query, there seems to be some board level fix needed to run Ethernet test on E2 revision of the AM263-LP.

    Let me check internally and share the fix by tomorrow.

    Regards,

    Prasad

  • Hello Michael,

    This seems to be known issue due to board level changes. Sorry for inconvenience. 

    Below is fix. Let us know if it helps.

    In the AM263x LP User Guide (https://www.ti.com/lit/ug/spruj10a/spruj10a.pdf), Figure 1-1 within the Important Usage Notes section contains an image footnote with the details.

    Regards,

    Prasad

  • Prasad,

    Is this R61 & R62?

    --Richard Studley

  • Richard,

    The AM263x the series termination resistors R61 & R62 are 33Ω on E2 LaunchPads with the "M1" sticker. It should be noted that R71 and R72 are also swapped with 33Ω series termination resistors on E2 LaunchPads with the "M1" sticker. The AM2634x LaunchPad has an analog switch (U17) that allows for the selection between the CPSW and ICSSM MDIO signals. The aforementioned User Guide (https://www.ti.com/lit/ug/spruj10a/spruj10a.pdf) contains Figure 4-8 and 4-9 that detail this information with an image footnote. 

    Regards,

    Erik

  • Erik,

    Thank you for pointing out those additional figures, that confirms our assumptions.

    Best, 

    Richard

  • Richard,

    Does this answer all of your immediate questions? 

    Regards,

    Erik

  • Hi Erik,

    That answers our question about which resistors need replacement. I updated my laptop earlier this week and am having some issues getting the boards to flash, so we can't verify that the resistors fix the original problem yet.