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.

Compiler/PROCESSOR-SDK-DRA8X-TDA4X: ETH test

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

Tool/software: TI C/C++ Compiler

hello,

I want to test the Ethernet driver in psdk_rtos_auto_j7_07_00_00_11, but it seems that the target board and the computer can't communicate.

I tested it according to the MCAL Module user guide/Eth&EthTrcv user guide.

I installed ubuntu18.04 on VMware Workstation 15.5 PRO.

When I use the command ifconfig -s, the output is as follows:

Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
ens33 1500 0 0 0 0 0 0 0 0 BMU
lo 65536 85573 0 0 0 85573 0 0 0 LRU

I can't tell what the problem is. Could you give me some advice?

Thanks a lot.

  • More Info:

    target side log:

    Eth Application build date/time: Aug 10 2020, 12:16:34
    Eth Application Starts
    MAC Port 1 Address: 78:db:2f:e5:74:ec
    EthTrcv mode: ACTIVE
    EthTrcv link state: Up
    EthTrcv baud rate: 1000Mbps
    EthTrcv duplexity: Full
    EthIf_TrcvModeIndication: Active


    -----------------------------------------------------------
    test_0001: START

    host side log:

    sudo ./EthHostApp -i ens33
    [sudo] *的密码:
    Interface : ens33
    MAC address : (right)


    Waiting for DUT..

  • I was testing the Ethernet driver for MCU1_0.

    On the MCU ENET RJ45, neither of the left indicators will flash, while the right indicator will flash.

    So I guess the Ethernet frame didn't come out.

  • loopback test log:

    Eth Application build date/time: Aug 10 2020, 12:16:34
    Eth Application Starts
    MAC Port 1 Address: 78:db:2f:e5:74:ec
    test_0200: START
    test_0200: completed 1000 of 1000 iterations
    test_0200: END
    Test 0200: Pass

    ----------------------------
    Controller 0 Counters
    ----------------------------
    Buffer overruns : 0
    CRC errors : 0
    Undersize packets : 0
    Oversized packets : 0
    Alignment errors : 0
    SQE errors : -1
    Discarded inbound : -1
    Erroneous inbound : 0
    Discarded outbound: -1
    Erroneous outbound: 0
    Single collision : 0
    Multiple collision: 0
    Deferred transm : 0
    Late collisions : 0
    Excessive colls : 0
    Carrier loss : 0
    ----------------------------
    Controller 0 Rx Statistics
    ----------------------------
    Rx Drop Events : 0
    Rx Octets : 1518000
    Rx Packets : 2000
    Rx Bcast Packets : 1000
    Rx Mcast Packets : 0
    Rx CRC/Align Errors : 0
    Rx Undersized Packets: 0
    Rx Oversized Packets : 0
    Rx Fragments : 0
    Rx Jabbers : 0
    Rx Collisions : -1
    Rx 64 bytes or less Packets : -1
    Rx 65 to 127 bytes Packets : -1
    Rx 128 to 255 bytes Packets : -1
    Rx 256 to 511 bytes Packets : -1
    Rx 512 to 1023 bytes Packets : -1
    Rx 1024 to 1518 bytes Packets : -1
    Rx Unicast Packets : 0
    ----------------------------
    Controller 0 Tx Statistics
    ----------------------------
    Tx Num octets : 1518000
    Tx No Unicast Packets : 1000
    Tx Unicast Packets : 0
    --------------------------------
    Controller 0 Tx Error Counters
    --------------------------------
    Tx Deferred transm : 0
    Tx Single collisions : 0
    Tx Multiple collisions : 0
    Tx Late collisions : 0
    Tx Excessive collisions : 0
    ETH Stack Usage: 2288 bytes
    Eth Application Completed

  • I load the image via CCS. Follow the steps CCS SetUp for J721e indicates.

  • hardware platform:

    J721EX SOMG01EVM PROCO78E7(001)

    J721EXCP01EVM PROC079E3A

  • hi,

    I want to test CPSW_2G(MCU_CPSW0).

    I follow the user manual and I'm trying to troubleshoot the problem.

    Thanks~

  • Hi,

    We are checking this with the ETH expert and will get back to you as early as possible.

    Regards,

    Sunil

  • Is it possible to run Wireshark on the Ubuntu PC and check if packets are being received? Also, please run: "ethtool -S <if_name> | grep -e err -e drop" and check if packets may be dropped due to CRC or other error.

    Please also try setting the PHY configuration parameters in EthTrcv configuration:

    .txClkShiftEnable = TRUE,
    .rxClkShiftEnable = TRUE,
    .txDelayInPs = 2750U,
    .rxDelayInPs = 2500U,
    .outputImpedanceInMilliOhms = 35000U,
    .txFifoDepth = 4U,

    Regards,

    -Misa

  • Hi, Misa:

    I have tested the "Eth & EthTrcv User Guide" from https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/mcusw/mcal_drv/docs/drv_docs/ug_eth_top.html.

    I installed an Ubuntu 16.04 PC for this test.

    When I test with SDK v6.2, I can run the test successfully, here is the log:

    PC log: host_v6.2.log.zip

    Target side log:

    log-20200817-6.2_devicelog.txt.zip

    But when I run the test with SDK v7.0, the test will stuck at test 5, below is the log:

    PC log: host.zip

    device log:

    log-20200817.zip

    , do I miss any steps to run this demo?

    Thanks.

  • Peter,

    Packets are being dropped on RX direction (CPSW_2G RX), even test_0001 failed for you.  This could be due to CRC errors, we can confirm that by looking into the statistics registers.

    We can use debug GEL files from the PDK CPSW driver. I assume you have CCS setup, so please follow below instructions:

    1. Launch CCS and connect to MCU R5F core
    2. Click on Tools --> Gel Files option from the top level menu
    3. In the newly opened GEL Files window, right click and choose “Load GEL”
    4. Choose file pdk_jacinto_07_00_00/packages/ti/drv/cpsw/tools/debug_gels/cpsw_startup.gel
    5. Click on Scripts --> CPSW Statistics Print --> cpsw_2g_ststsprint_nonzero and you will see the stats registers on the console of CCS.

    The registers are printed for host port (Port 0) and MAC port (Port 1). CRC errors, if present, should be in the Port 1 block. Please check there.

    Also, is your Ethernet connection (on the PC side) done with built-in port? Or are you using some USB network adapter? Built-in port is preferable.

    Thanks,

    -Misa

  • Peter,

    Please use below RGMII delay values:

    • .txDelayInPs = 1250U
    • .rxDelayInPs = 2000U

    You can keep the other EthTrcv parameters I had suggested in an earlier post.

    -Misa

  • Hi, :

    Many thanks for your help.

    I have tested the changes from your post, here is the result:

    The test still gets stuck:

    target log:

    20200821_target.zip

    PC log: similar as the previous test log

    information dump:

    MCU_Cortex_R5_0: GEL Output: --------------------------------
    MCU_Cortex_R5_0: GEL Output:           PORT0 STATS          
    MCU_Cortex_R5_0: GEL Output: --------------------------------
    MCU_Cortex_R5_0: GEL Output: STAT_0_RXGOODFRAMES              = 0x000007D9
    MCU_Cortex_R5_0: GEL Output: STAT_0_RXBROADCASTFRAMES         = 0x000007D9
    MCU_Cortex_R5_0: GEL Output: STAT_0_RXOCTETS                  = 0x002E55A0
    MCU_Cortex_R5_0: GEL Output: STAT_0_TXGOODFRAMES              = 0x00000E53
    MCU_Cortex_R5_0: GEL Output: STAT_0_TXMULTICASTFRAMES         = 0x00000004
    MCU_Cortex_R5_0: GEL Output: STAT_0_TXOCTETS                  = 0x003B6FA8
    MCU_Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES64             = 0x0000000D
    MCU_Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES65T127         = 0x0000048B
    MCU_Cortex_R5_0: GEL Output: STAT_0_OCTETFRAMES1024TUP        = 0x00001194
    MCU_Cortex_R5_0: GEL Output: STAT_0_NETOCTETS                 = 0x0069C548
    MCU_Cortex_R5_0: GEL Output: --------------------------------
    MCU_Cortex_R5_0: GEL Output:           PORT1 STATS          
    MCU_Cortex_R5_0: GEL Output: --------------------------------
    MCU_Cortex_R5_0: GEL Output: STAT_1_RXGOODFRAMES              = 0x0000123B
    MCU_Cortex_R5_0: GEL Output: STAT_1_RXMULTICASTFRAMES         = 0x00000004
    MCU_Cortex_R5_0: GEL Output: STAT_1_ALE_DROP                  = 0x000003E8
    MCU_Cortex_R5_0: GEL Output: STAT_1_RXOCTETS                  = 0x00487798
    MCU_Cortex_R5_0: GEL Output: STAT_1_TXGOODFRAMES              = 0x000007D9
    MCU_Cortex_R5_0: GEL Output: STAT_1_TXBROADCASTFRAMES         = 0x000007D9
    MCU_Cortex_R5_0: GEL Output: STAT_1_TXOCTETS                  = 0x002E55A0
    MCU_Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES64             = 0x0000000D
    MCU_Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES65T127         = 0x0000048B
    MCU_Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES128T255        = 0x000001F4
    MCU_Cortex_R5_0: GEL Output: STAT_1_OCTETFRAMES1024TUP        = 0x00001388
    MCU_Cortex_R5_0: GEL Output: STAT_1_NETOCTETS                 = 0x0076CD38
    MCU_Cortex_R5_0: GEL Output: STAT_1_PORTMASK_DROP             = 0x000003E8
    MCU_Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_UNI              = 0x00000002
    MCU_Cortex_R5_0: GEL Output: STAT_1_ALE_UNKN_UNI_BCNT         = 0x00000648
    MCU_Cortex_R5_0: GEL Output: STAT_1_TX_PRI_REG             [0]= 0x000007D9
    MCU_Cortex_R5_0: GEL Output: STAT_1_TX_PRI_BCNT_REG        [0]= 0x002E55A0
    
    

    Are there any clues why this happens?

  • Peter,

    Below stats indicates that the CPSW2G MAC port only received 4,667 frames. This number should ~5,004 for the number of tests it managed to complete.

    • STAT_1_RXGOODFRAMES = 0x0000123B

    The packets dropped below are expected for the tests that were completed:

    • STAT_1_ALE_DROP = 0x000003E8
    • STAT_1_PORTMASK_DROP = 0x000003E8

    When packets are dropped due to incorrect RGMII delays, we would usually see CRC or ALIGN errors. But we don't see any of them.

    Please check with Wireshark how many packets were actually sent from the PC.

  • Hi,

    I replaced a computer, installed Ubuntu1804. The 0602 version passed my tests. So finally eliminate all kinds of factors, should be my computer network card problem.

    Thank you a lot!

  • Hi,

    I replaced a computer, installed Ubuntu1804. The 0602 version passed my tests. So finally eliminate all kinds of factors, should be my computer network card problem.

    Thank you very much!