AM2632: CPSW Phy loopback example is not working

Part Number: AM2632

Tool/software:

Hi,

CPSW Phy loopback example is not working in mcu_plus_sdk_am263x_10_00_00_35 SDK (software-dl.ti.com/.../EXAMPLES_ENET_CPSW_LOOPBACK.html). I am not able to receive the data back in Rx buffer. I am executing the loopback example as is. Please let me know if any fixes are required in loopback example. 

Thank you,

Shitanshu Desai

  • Hi Shitanshu Desai,

    I test the same application on AM263x-LP from v10.00.00.35 SDK, I do see the Rx and Tx stats matching, and the application working as expected. 

    1. Can you please share more details about what failure do you see?

    2. Which Rx buffer are you referencing?

    3. Can you compare my logs (Attached below) with yours and see if you see PHY Link up and alive as well as CPSW Handle link up and Open MAC Port logs?

    For reference, I have attached my logs and .out file.

    =============================
     Enet Loopback: Iteration 1 
    =============================
    CPSW_3G Test
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:0 From 4 To 2 
    Open MAC port 1
    EnetPhy_bindDriver:1842 
    PHY 3 is alive
    PHY 12 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Cpsw_handleLinkUp:1626 
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    
     Port 1 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    Cpsw_handleLinkDown:1652 
    Test complete: PASS
    =============================
     Enet Loopback: Iteration 2 
    =============================
    CPSW_3G Test
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:0 From 4 To 2 
    Open MAC port 1
    EnetPhy_bindDriver:1842 
    PHY 3 is alive
    PHY 12 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Cpsw_handleLinkUp:1626 
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    
     Port 1 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    Cpsw_handleLinkDown:1652 
    Test complete: PASS
    =============================
     Enet Loopback: Iteration 3 
    =============================
    CPSW_3G Test
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:0 From 4 To 2 
    Open MAC port 1
    EnetPhy_bindDriver:1842 
    PHY 3 is alive
    PHY 12 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Cpsw_handleLinkUp:1626 
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    
     Port 1 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    Cpsw_handleLinkDown:1652 
    Test complete: PASS
    =============================
     Enet Loopback: Iteration 4 
    =============================
    CPSW_3G Test
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:0 From 4 To 1 
    Open MAC port 1
    EnetPhy_bindDriver:1842 
    PHY 3 is alive
    PHY 12 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Cpsw_handleLinkUp:1626 
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    
     Port 1 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    Cpsw_handleLinkDown:1652 
    Test complete: PASS
    =============================
     Enet Loopback: Iteration 5 
    =============================
    CPSW_3G Test
    EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:0 From 4 To 1 
    Open MAC port 1
    EnetPhy_bindDriver:1842 
    PHY 3 is alive
    PHY 12 is alive
    initQs() txFreePktInfoQ initialized with 16 pkts
    Cpsw_handleLinkUp:1626 
    Received 5000 packets
    Delete EnetApp_rxTask() and exit..
    Transmitted 5000 packets 
    Delete EnetApp_txTask() and exit..
    
     Port 0 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    
     Port 1 Statistics
    -----------------------------------------
      rxGoodFrames            = 5000
      rxBcastFrames           = 5000
      rxOctets                = 2590000
      txGoodFrames            = 5000
      txBcastFrames           = 5000
      txOctets                = 2590000
      octetsFrames512to1023   = 10000
      netOctets               = 5180000
      txPri[0]                = 5000
      txPriBcnt[0]            = 2590000
    
    Cpsw_handleLinkDown:1652 
    Test complete: PASS
    Loopback application completed
    All tests have passed!!
    

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/908/enet_5F00_cpsw_5F00_loopback_5F00_phy_5F00_end.release.out

    Regards,
    Shaunak