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: CC2640R2F of Uart_readcancel issue

Tool/software: TI-RTOS

i enable the uart rx_callback mode and call the Uart_readcancel(uart_handle) and Uart_close(uart_handle).but the consumption is 3.65mA,the means Uart_readcancel  does not  work?

And i enable the uart rx_blocking mode.and closeUart_close(uart_handle).the consumption is 0.005mA. 

what i can do ???

  • Hello,

    According to the documentation for uart_readcancel:

    /*!
    * @brief Function that cancels a UART_read() function call.
    *
    * This function cancels an asynchronous UART_read() operation and is only
    * applicable in #UART_MODE_CALLBACK.
    * UART_readCancel() calls the registered RX callback function no matter how many bytes
    * were received. It is the application's responsibility to check the count argument in
    * the callback function and handle cases where only a subset of the bytes were received.
    *
    * @param handle A #UART_Handle returned by UART_open()
    */

    To that end, are you performing the count check in your callback?

    Best wishes
  • hi jxs:
    i dont know what u want talk. In UART_MODE_CALLBACK,how can i know when the data is coming ???
    In other words, when i test, there is no received data. Then i call UART_readCancel. u can test.thanks.