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/cc2650: UART RX Interruption

Part Number: CC2650
Other Parts Discussed in Thread: CC2650

Tool/software: TI-RTOS

Hi all, I am wondering why the UART RX interruption are not available I mean the real one no calling UART_read() to listening the port every time I call that function and triggered it when the desired buffer size is full.

The only way to handle the UART RX incoming data in real time is a using a External Pin interruption and do the task in the External Pin Interruption context.

know it is a old post, but... I have to say something here for some one else that is experimenting the same

How is it possible that there are not UART RX event for incoming data? just calling the UART_read() every time we want received data is practically be listening the port, it is not a real UART event, it is checking the is the desired buffer size is full or not. Handle a UART RX event by a External Pin interruption may be a solution, but it is not an elegant solution

Thanks

  • Hi,

    you have to use the UART driver in callback mode as described in the mentioned post. In callback mode, the UART RX interrupt is somehow mapped to the rx-callback. You would enable RX by calling UART_read().

    If you don't know in advance how many bytes you will receive, enable UARTCC26XX_CMD_RETURN_PARTIAL_ENABLE as described in the UARTCC26XX driver API documentation (section "Receive with Return Partial") and in addition, you want to set UART_MODE_CALLBACK for RX.

    The CC2650 hardware does never give you an interrupt after a single byte, the minimum is 4 byte unfortunately. RETURN_PARTIAL will return from UART_read() (or post the callback in callback mode) either after the desired amount of bytes has been received (when >= 4) or after a 32 bit period of inactivity on the RX line. Is this real-time enough?

    Otherwise you would have to implement a software UART using pin interrupts. You can even use the Sensor Controller to do that.