AnsweredAssumed Answered

Freertos uart receive

Question asked by 玮 姚 on Nov 8, 2017
Latest reply on Feb 20, 2019 by Chinag Kuan Yi


I use the SDK_2.2_TWR-K60D100M and try to use the freertos_uart.c on my TWR-K60D100M board to test receive data from UART. 

The program like this 

   UART_RTOS_Receive(&handle, recv_buffer, 20, &n);


      UART_RTOS_Send(&handle, (uint8_t *)recv_buffer, n);


Now, I use the labtop send data to TWR-K60D100M board.

I found when the program run to UART_RTOS_Receive(&handle, recv_buffer, 20, &n), the program is going to block state, when receive data over 20 and the program will active.


My question is how to let the UART_RTOS_Receive(&handle, recv_buffer, 20, &n) immediately return, rather than wait the received data over 20.