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.

RTOS / TMS320C6678 :Uart, Task, SWI question

Part Number: TMS320C6678

Tool/software: TI-RTOS


I made the Uart receiving task polling method, and I wrote the code to collect the received data into a package and make it into another task.

Data is received and processed, but occasionally, Uart data is missed due to task priority in Uart task. At this time, we are processing in another task.

1. Can Uart support Blocking Task in TI BIOS?

2. Is it possible to handle SW interrupt instead of polling method for Uart ?

3. I am wondering if there is any sample code or reference Data in questions 1 and 2 above.

Below is a part of the code.

Thank you

main()
{
          ...

Error_init(&eb);
Task_Params_init(&params);
params.priority = 1; 
task = Task_create(recvSerial, &params, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}

...

}

void recvSerial()
{
     unsigned char recv = 0;

     while (1)
     {
          ret = platform_uart_read(&recv, 1000);
          ...

          Mailbox_post(cmdMbx, &stCmdMsg, BIOS_NO_WAIT);
          ...

          Task_sleep(1);

     }
}



  • Hello,

    There are RTOS based UART examples provided in Processor SDK package. Processor SDK can be downloaded from here:

    www.ti.com/.../PROCESSOR-SDK-C667X

    Please refer to the following documentation for steps on building the examples:
    software-dl.ti.com/.../Overview.html

    Documentation for the UART driver can be found here:
    software-dl.ti.com/.../Device_Drivers.html

    Some other useful links for your reference:

    TI-RTOS Workshop Series:
    training.ti.com/ti-rtos-workshop-series

    Processor SDK Training Series:
    training.ti.com/application-development-using-processor-sdk-rtos
  • Thanks for the answer.
    I created an example project through the "pdfProjectCreate.bat" file in the folder "C: \ ti \ pdk_c667x_2_0_11 \ packages" referring to the above website.
    
    I created "UART_BasicExample_C6678_c66xExampleProject" referring to the following website, and succeeded in executing it from 6678.
    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/Overview.html#building-the-sdk
    
    However,
    You need the following project in the folder "C: \ ti \ pdk_c667x_2_0_11 \ packages \ ti \ drv \ uart \ example"
    UART_BasicExample_Intr_ExampleProject
    UART_BasicExample_Polling_ExampleProject
    .
    
    I compressed example.zip into an attachment.
    
    
    I tried many other things.
    Attempted by applying .c file and .cgf file in UART_BasicExample_Intr_ExampleProject to UART_BasicExample_C6678_c66xExampleProject. After the error, I removed the error through several operations, but basically I need to change the uart.h and uart_stdio.h files and stop here and query.
    
    Inquiry content:
    I want to create "UART_BasicExample_Intr_ExampleProject" and "UART_BasicExample_Polling_ExampleProject" in the folder "C: \ ti \ pdk_c667x_2_0_11 \ packages \ ti \ drv \ uart \ example"
    
    Thank you.

    example.zip

  • Not all the examples in the folder apply to your device as you can see from the table here:
    software-dl.ti.com/.../Device_Drivers.html

    For C6678, the only examples that we provide are the basic example and the test example in the test folder. The test example should have the setting for interrupt mode as well as dma mode for the device.

    Regards,
    Rahul