This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART Reception only 6 bytes

Hello,

Using the "simple_uart_get_ with_timeout",I cannot receive a "frame" bigger than 6 bytes. Why?

while(simple_uart_get_with_timeout(1, &UART_RX[receivedBytes])){receivedBytes++;}

How to deal with this problem?

thank you!

Parents
  • Best guess: On the latest nRF51 chips the UART FIFO is 6 characters. I suspect the FIFO is already full when you start polling the data out of the FIFO. If you don't have HW flow control turned on it is likely any further characters transmitted by the other side have been dropped. If you do have HW flow control turned on perhaps your other side doesn't resume transmitting quickly enough after you begin polling the characters out of the FIFO.

  • thank you! I have another question, when increase the time out to 450ms.

    while(simple_uart_get_with_timeout(400, &UART_RX[receivedBytes])){receivedBytes++;}
    

    After 2 or 3 sendings, it works. All bytes are received. How to explain this ?

Reply Children
No Data
Related