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: UART_Read() missing characterts

Other Parts Discussed in Thread: CC2650

Tool/software: TI-RTOS

Hi All

I added UART to the simple BLE peripheral project and I am having an issue related the UART_read()

     UART_Params_init(&uartParams);
     uartParams.writeDataMode   = UART_DATA_BINARY;
     uartParams.writeMode       = UART_MODE_CALLBACK;
     uartParams.writeCallback   = WriteCallback;
     uartParams.readMode        = UART_MODE_CALLBACK; 
     uartParams.readCallback    = ReadCallback;
     uartParams.readReturnMode  = UART_RETURN_FULL;
     uartParams.readEcho        = UART_ECHO_OFF;
     uartParams.baudRate        = 9600;
     uart = UART_open(Board_UART0, &uartParams);

I am calling the  UART_read(uart, &input, 1); inside the main loop on SimpleBLEPeripheral_taskFxn, it works the major part of time, but some times I miss 1 byte 1/500 times. My application requires reads byte to byte no another way.

My concern is I MUST have to call UART_read() every time I want receive UART data and the UART read is define as CallBack (a pseudo interruption), but some times it lost the incoming data

I tried in several ways calling the UART_read inside the UART Read CallBack, inside the main loop on SimpleBLEPeripheral_taskFxn, and still happen the same issue

I read severals post in the forum without a real solution examples:

https://e2e.ti.com/support/embedded/tirtos/f/355/t/484490

https://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/t/538869

hardware :CC2650

Thanks

Ela

can some one give one hand with this?

  • Hello Ela,

    We use UART in our Host Test firmware quite extensively and do not see loss of data. Your baud rate is quite low, are you doing something in your application that could block processing? Have you tried setting the FIFO interrupt to a lower threshold?

    Best wishes
  • Hey JXS, I did not have tested it using FIFO interrupt (can you give me any reference for usage?) the UART I am using is basically the echo example for the CC2650launchpad with changes to working with callback functions when I use UART_read and UART_write. for the case the UART_read() I call it fuctions inside the my taskFxn() If I call it outside the taskFxn wont work.

    #update# my aplication uses BLE and I notices the uart missing data occurs when the peripheral is linked/connected to a central

    Thanks :)