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] 66AK2E05: UART Example project for K2E family devices

Part Number: 66AK2E05

Explain the Code, Hardware configuration, and Implementation of the UART example project in K2E family devices?

  • To run the UART example for K2E devices make sure the prerequisites are present.

    1. Install CCS (,

    2. TI RTOS SDK

      1. For K2E: Install PROCESSOR-SDK-RTOS-K2E  (Version: 06_03_00_106, ),

    3. Generate the Example projects for PDK,

      1. For K2E: (

    Now, Import the CCS project into CCS and go on

    1. To Import the project, Goto 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\").

      1. we have the following DSP example projects

        1. UART_BasicExample_K2E_c66xDMATestProject,

        2. UART_BasicExample_K2E_c66xExampleProject,

        3. UART_BasicExample_K2E_c66xTestProject.

      2. we have the following ARM example projects

        1. UART_BasicExample_K2E_armDMATestProject,

        2. UART_BasicExample_K2E_armExampleProject,

        3. UART_BasicExample_K2E_armTestProject.

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

      4. In this FAQ, "UART_BasicExample_K2E_c66xExampleProject" is explained here.

    2. For Hardware connections,

      1. we can connect through the RS232Serial cable(with 4 PIN header) received along with EVM to COM1 (mentioned in EVM) and through Mini USB connecting through J1 (Other mini USB port (J3) used by Onboard Debug Emulator).

      2. 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.

      3. UART configuration used in these projects were "8N1"(Data Bit = 8, Parity = None and Stop bit = 1) and baud rate "115200".

      4. EVM should be kept in "No Boot" mode and the switch settings are shown below.

      5. Video demo

        1. DSP 

        2. ARM 

      6. Kindly refer to these board documents for detailed hardware information on the K2E EVM,

        1. EVMK2E Quick setup guide EVMK2E_QuickSetupGuide.pdf

        2. EVMK2E technical reference guide 2335.EVMK2E_Technical_Reference_Manual.pdf

        3. EVMK2E Schematics 2364.K2E_EVM_SCH_16_00175_03.pdf

    3. For Connecting K2E EVM with CCS, Kindly refer to these links.



    4. To build the project, Select the project and right-click to select "Rebuild the Project". Check for compilation errors and get the "Build finished successfully" message.  

    5. To run the project, Run the "K2E" target configuration and load the binary in the respective core. 

    6. Code explanation,

      1. Function: main ()

        //Declaration - Main thread function created as a task
        Task_Handle task;
        //Declaration - Error returned in the main thread will be reported to the error block
        Error_Block eb;
        //Initializes board UART parameters
        //Initiate error block
        //Main thread definition
        task = Task_create(uart_test, NULL, &eb);
        /* Start BIOS */

      2. Function: uart_test()

        //Prints "str" in UART port
        //Stores string from UART port to "ptr" pointer up to a length of "len"

      3. For other UART driver definitions

        1. Driver APIs: "{TI_RTOS_K2E_INSTALLATION}/pdk_k2e_4_0_16/packages/ti/drv/uart/docs/doxygen/html/files.html"

        2. CSL APIs: "{TI_RTOS_K2E_INSTALLATION}/pdk_k2e_4_0_16/packages/ti/csl/docs/doxygen/html/group___c_s_l___u_a_r_t.html

      4. To view output use any of the Serial port terminals like "Putty", "Teraterm" or "Hercules HW".

    Thanks & regards,

    Rajarajan U