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.

[FAQ] EVMK2GX: How to build, run and test the EMAC example on DSP core of K2G family processor

Part Number: EVMK2GX
Other Parts Discussed in Thread: 66AK2G01, K2GICE, 66AK2G02, , 66AK2G12

How to build, run and test the EMAC example from TI-RTOS PDK for the K2G family processors (EVMK2G, EVMK2GX, EVMK2GX, 66AK2G01, 66AK2G02, 66AK2G12 and K2GICE) on its DSP core?

  • Greetings, To Build, Run and Test the EMAC example for K2G devices make sure the prerequisites are done without any errors.

    1. Install CCS (https://www.ti.com/tool/download/CCSTUDIO/9.3.0.00012),

    2. TI RTOS SDK

      1. For K2G: Install PROCESSOR-SDK-RTOS-K2G  (Version: 06_03_00_106, https://software-dl.ti.com/processor-sdk-linux/esd/K2G/latest/index_FDS.html ),

    3. After installing TI-RTOS SDK and CCS, we need to generate the Example projects for PDK(Processor Development Kit, folder present inside the "C:\ti", where all the driver APIS, Documentation, and Example code are present.),

      1. For K2G: https://e2e.ti.com/support/processors-group/processors/f/791/t/1135633.

    Now, Import the CCS project into CCS and go on

    1. To Import the project, Go to File -> Import -> "CCS projects" in "C/C++" -> Browse "Select Search-directory". make sure to uncheck the "Copy Projects into Workspace" (This is to avoid compilation errors only If TI-RTOS SDK was installed in a different location than "C:\ti\").

                            

    we have the following DSP example projects

      1. EMAC_BasicExample_evmK2G_c66xExampleProject

      2. EMAC_BasicExample_iceK2G_c66xExampleProject

      3. EMAC_CpswRateLimit_evmK2G_c66xExampleProject

      4. EMAC_CpswRateLimit_iceK2G_c66xExampleProject

      5. EMAC_cptsEventExample_evmK2G_c66xExampleProject

      6. EMAC_cptsTsCmpExample_iceK2G_c66xExampleProject (Note: ICE - Industrial Communications Engine, is an extended module with bulk features added compared to evmK2G).

      7. Do not open ARM and DSP examples at the same time, CCS will throw the "Project out-of-sync" error dialog.

    1. Hardware connections,

      1. Ethernet port connected from Router or Switch.

      2. We can connect through Mini USB connecting through J1 (Another mini USB port (J3) used by Onboard Debug Emulator).

      3. There will be two mini USB ports available for UART in the "Device Manager" section in "Windows OS" (CP2105 chipset, refer to device manager image for reference)

        1. The Port with the lowest number is the UART port.

        2. The Port with the highest number is BMC port. To create a Target configuration for "EVMK2G", kindly refer to this URL https://e2e.ti.com/support/processors-group/processors/f/791/t/1135633

        3. In this project, All debug outputs are printed using "UART_Printf". Hence, Log can be viewed in the UART port. UART configuration used in these projects were "8N1"(Data Bit = 8, Parity = None, and Stop bit = 1) and baud rate "115200".

    2. In this FAQ, "EMAC_BasicExample_evmK2G_c66xExampleProject" is built and run. This example deals with EMAC physical layer to send and receive packets.

    3. EVMK2G hardware settings,

      1. Boot Mode switch settings

        SW3[4:1] BOOT MODE
        0000 (0x0) Sleep/No Boot
        0001 (0x1) PCIe boot
        0010 (0x2) Ethernet Boot
        0011 (0x3)

        I2C PLL Boot

        0100 (0x4) SPI No PLL Boot
        0101 (0x5) SPI PLL-1 Boot
        0110 (0x6) USB Boot
        0111 (0x7) MMC/SD Boot
        1000 (0x8) UART Boot
        1001 (0x9) QSPI 96 Boot
        1010 (0xa) eMMC Boot
        1011 (0xb) NAND Boot
        1100 (0xc) I2C No PLL Boot
        1101 (0xd) SPI PLL-2 Boot
        1110 (0xe) SPI PLL-3 Boot
        1111 (0xf)

        QSPI 48 Boot

      2. No Boot Mode switch settings : 

      3. More details on the hardware setup can be found in https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/How_to_Guides/Hardware_Setup_with_CCS/66AK2G02_GP_EVM_Hardware_Setup.html

      4. To Build the project, Select the project and then give "Rebuild project". It will build without errors, once the code is not modified.

    4. In the EMAC project, The example has 4 major functions 

      1. app_test_task_emac_init - Initialises the driver.

      2. app_test_task_poll_link - Check for the link status.

      3. app_test_task_send_pkts - Sends the packets to a particular port.

      4. app_test_task_poll_pkt - Receives the packet on a particular port. These functions are created as tasks and called in the"main()" function.

    5. The Above mentioned steps have been recorded in a video.

    Thanks & Regards,

    Rajarajan U