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.

KEYSTONE2 NETCP - HOST PORT CANNOT SEND ETHERNET PACKET TO PHY

We are developing our own ethernet driver for the Keystone2 K2L SOC.  We have a K2L EVM.  The problem I have is that we can receive packets from the PHY but cannot send any packets to the PHY.  The port statistics show that packets are being Tx'ed and Rx'ed but Wireshark shows no packets on the PHY output.  The PC running wireshark can send ARP requests to the host port and these are received.  Does anyone know what the problem could be ?

  • Hi John,
    I understand that you are using custom K2L board. Are you using the same PHY used in K2L EVM?

    Have you tried to ping from K2L board to host using u-boot? What is the link status?

    Thank you.
  • We are using a K2L EVM board.  We are loading our test application via UBoot using TFTP so I know the network is good.  We have tried the ALE in bypass mode and not in bypass mode.  We can receive packets at the host port but we cannot send packets from the host port to any of the switch ports.  As I said the port statistics show packets sent and received correctly i.e. they count up when I send packets from host port zero to one of the switch ports which also shows statistics counting up.  But the packet does not appear from the PHY.  As we can received packets from the network I assume the PHY is configured ok.  What I don't know is where the statistics are generated so I can work out which part of the chain to investigate.

  • John,

    As I understood that you are developing your own Ethernet driver for K2L and you are using K2L EVM, the u-boot and TFTP is working.

    I am not sure how your Ethernet drive code is based on or why you need to develop Ethernet driver code:

    1) We have a Out of Box image processing demo under mcsdk_bios_3_01_03_06\demos\image_processing. This demo uses NDK to handle TCP/IP, UDP stack, the underneath MAC layer is handled by NIMU driver. The NIMU driver source code is under pdk_keystone2_3_01_03_06\packages\ti\transport\ndk\nimu. You can look at this code nimu_eth.c for reference.

    Or,

    2) we have standalone EMAC example project/code under pdk_keystone2_3_01_03_06\packages\exampleProjects\PA_emacExample_K2L_exampleProject. This code you can do EMAC loopback or non-loopback testing, which is controlled by:

    cpswLpbkMode =

    /* Define LoopBack modes */

    #define

    CPSW_LOOPBACK_NONE 0

    /* No Loopback */

    #define

    CPSW_LOOPBACK_INTERNAL 1

    /* SGMII internal Loopback */

    #define

    CPSW_LOOPBACK_EXTERNAL 2

    /* Loopback outside SoC */

    #define

    CPSW_LOOPBACK_SERDES 3

    /* SGMII Serdes Loopback */

    In non-loopback mode, you should be able to see packet going out of the PHY and capture it with Wireshark. The packet is UDP packet defined below with IP address 192.168.1.x

    uint8_t

    pktMatch[] =

    0xc0, 0xa8, 0x01, 0x01,

    /* Source IP address */

    0xc0, 0xa8, 0x01, 0x0a,

    /* Destination IP address */

    Make sure your PC is on the same subnet as the packets and no switch/router in your network throw those packets away.

    If the counter/statistics you mentioned is STATA/B/C/D, they are obtained from GbE switch ports. There is no counter at PHY level.

    Regards, Eric