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.

Testing Socket communication for K2L EVM Board with PC

Hi,

We are trying to run a sample client program provided in MCSDK under ti\mcsdk_bios_3_01_04_07\examples\ndk\client with setting the board in DSP no boot mode.
We are not able to get any prints in the console. Could anyone please exlain what this sample application does? what should be the IP configurations given in the Client.c file ?

Basically what we are trying to do is we need to test socket communication between K2L Board and Host(pc), we found from the forum that we need to use sample ndk applications for K2L Board.we successfully compiled the application but we do not know what should be the behaviour of this application,currently we do not see any console messages , kindly let us know step by step procedure to run a sample ndk application.


Thanks,
Kushal

  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    We will get back to you on the above query shortly. Thank you for your patience.

    Thank you.

    Note: We strongly recommend you to create new e2e thread for your queries instead of following up on an old/closed e2e thread, new threads gets more attention than old threads and can provide link of old threads or information on the new post for clarity and faster response.

  • Hi Kushal,

    Please refer below wiki to run NDK Client example on EVM. Also we recommend you to use latest Processor SDK released for development. Please find the download and migration guide link below my signature.

    Thank you.

  • Dear Kushal,
    Your code is able to stop at main() after loading the code ?
    You would get the prints in CCS console window.

    I didn't use K2L EVM and I think, like K2E, you should run the script (setupPhy) before loading the NDK example on K2L.
    ''Scripts -> DSP CLOCK Estimation -> setupPhy''

    processors.wiki.ti.com/.../Running_NDK_examples_for_Keystone_devices
  • Hi Titus,

    Thanks for the reply. Actually our code is not stopping at main() and we are not able to see the prints in CCS console.
    We checked the call stack and the program is stuck in one function.
    I am pasting the call stack here.



    Please provide a way to resolve this so that I can proceed further.

    Thanks,
    Kushal

  • Dear Kushal,
    It seems to be known issue.
    This issue has been fixed in our latest Processor SDK release and you are using MCSDK.
    www.ti.com/.../PROCESSOR-SDK-K2L
    software-dl.ti.com/.../index_FDS.html


    Otherwise, you can comment out the "void CSL_SgmiiDefSerdesSetup()" entire function and use the following function and then rebuild the platform project.

    K2L platform project:
    C:\ti\pdk_keystone2_3_01_04_07\packages\ti\platform\evmk2l\platform_lib

    Import the above project and rebuild with mentioned change.

    C:\ti\pdk_keystone2_3_01_04_07\packages\ti\platform\evmk2l\platform_lib\src\evmc66x_phy.c

    void CSL_SgmiiDefSerdesSetup()
    {
    uint32_t i;
    CSL_SERDES_RESULT csl_retval;
    CSL_SERDES_LANE_ENABLE_STATUS lane_retval = CSL_SERDES_LANE_ENABLE_NO_ERR;
    CSL_SERDES_STATUS pllstat;
    uint32_t serdes_mux_ethernet_sel;
    int numPort1 = (NUM_MAC_PORTS > 2)?2:NUM_MAC_PORTS;
    int numPort2 = (NUM_MAC_PORTS > 2)?NUM_MAC_PORTS - 2:0;


    /* Check CSISC2_3_MUXSEL bit */
    if (CSL_FEXTR(*(volatile uint32_t *)(CSL_BOOT_CFG_REGS + 0x20), 28, 28) == 0)
    serdes_mux_ethernet_sel = 1;

    /* SB CMU and COMLANE and Lane Setup */
    csl_retval = CSL_EthernetSerdesInit(CSL_CSISC2_2_SERDES_CFG_REGS,
    CSL_SERDES_REF_CLOCK_156p25M,
    CSL_SERDES_LINK_RATE_1p25G); /* SGMII Lane 0 and Lane 1 */

    if (serdes_mux_ethernet_sel && numPort2)
    {
    csl_retval |= CSL_EthernetSerdesInit(CSL_CSISC2_3_SERDES_CFG_REGS,
    CSL_SERDES_REF_CLOCK_156p25M,
    CSL_SERDES_LINK_RATE_1p25G); /* SGMII Lane 2 and Lane 3 */
    }

    if (csl_retval != 0)
    {
    //System_printf ("Invalid Serdes Init Params\n");
    }

    //SB Lane Enable
    for(i=0; i < numPort1; i++)
    {
    lane_retval |= CSL_EthernetSerdesLaneEnable(CSL_CSISC2_2_SERDES_CFG_REGS,
    i,
    CSL_SERDES_LOOPBACK_DISABLED,
    CSL_SERDES_LANE_QUARTER_RATE); /* SGMII Lane 0 and Lane 1 */
    }

    if (serdes_mux_ethernet_sel && numPort2)
    {
    for(i=0; i < numPort1; i++)
    {
    lane_retval |= CSL_EthernetSerdesLaneEnable(CSL_CSISC2_3_SERDES_CFG_REGS,
    i,
    CSL_SERDES_LOOPBACK_DISABLED,
    CSL_SERDES_LANE_QUARTER_RATE); /* SGMII Lane 2 and Lane 3 */
    }
    }

    if (lane_retval != 0)
    {
    //System_printf ("Invalid Serdes Lane Rate\n");
    }

    /* SB PLL Enable */
    CSL_EthernetSerdesPllEnable(CSL_CSISC2_2_SERDES_CFG_REGS); /* SGMII Lane 0 and Lane 1 */

    /* Check CSISC2_3_MUXSEL bit */
    if (serdes_mux_ethernet_sel)
    CSL_EthernetSerdesPllEnable(CSL_CSISC2_3_SERDES_CFG_REGS); /* SGMII Lane 2 and Lane 3 */

    /* SB PLL Status Poll */
    do
    {
    pllstat = CSL_EthernetSerdesGetStatus(CSL_CSISC2_2_SERDES_CFG_REGS, numPort1); /* SGMII Lane 0 and Lane 1 */
    }while(pllstat == CSL_SERDES_STATUS_PLL_NOT_LOCKED);

    /* Check CSISC2_3_MUXSEL bit */
    if (serdes_mux_ethernet_sel)
    {
    do
    {
    pllstat = CSL_EthernetSerdesGetMuxStatus(CSL_CSISC2_3_SERDES_CFG_REGS, numPort2); /* SGMII Lane 2 and Lane 3 */
    }while(pllstat == CSL_SERDES_STATUS_PLL_NOT_LOCKED);
    }

    }


    Please let me know the status.
  • Hi Titus,

    I have tried the above mentioned steps. I rebuilt the Platform project after changing the void CSL_SgmiiDefSerdesSetup() function.
    When I try to build my original project, I am getting errors while linking. Symbols are not getting resolved.
    I am attaching the error list here.

     

    How to link this with the original project?
    Please let me know.

    Thanks,
    Kushal

  • Dear Kushal,

    Please refer to the MCSDK 3_01_03_06 where we don't see this issue.

    The following file has those declarations and its from MCSDK 3_01_03_06

    C:\ti\pdk_keystone2_3_01_03_06\packages\ti\csl\src\ip\serdes_sb\V0\csl_serdes_ethernet.h

    csl_serdes_ethernet.h

  • I would like you to use the latest processor SDK package.
    C:\ti\pdk_k2l_4_0_1\packages\ti\platform\evmk2l\platform_lib
  • Hi Titus,
    I have tried building the new platform package that you have mentioned. It is still not going to main().
    Stuck at CSL_SGMII_getStatus() at csl_cpssgmiiAux.h

    Thanks,
    Kushal
  • Are you saying that NDK example is not working in latest processor SDK too ??
    Have you tried below suggestion ?
    Porting MCSDK code ?
    To solve that linker error, you can use the ethernet CSL driver code from MCSDK 3_01_03_06
    C:\ti\pdk_keystone2_3_01_03_06\packages\ti\csl\src\ip\serdes_sb\V0\csl_serdes_ethernet.h
    e2e.ti.com/.../1862071
  • yes.
    I have used latest processor SDK and I am not able to run the NDK example.
    Have used E:\TI_folder\pdk_k2l_4_0_1\packages\ti\platform\evmk2l\platform_lib package and also removed the linker errors by using
    ti\pdk_keystone2_3_01_03_06\packages\ti\csl\src\ip\serdes_sb\V0\csl_serdes_ethernet.h file.
    Still not able to run
  • Okay, sorry for the inconvenience.
    Right now, I don't have a K2L board with me to reproduce & fix the problem.
    I faced same issue with K2H board and solved with earlier MCSDK version.

    So, I will forward your question to appropriate team to support you.

    Thanks for your patience.