UARTE does not receive RX RDY on timeout when double buffering

I've tested two scenarios using a hardware loopback to test UART functionality. The double buffer approach does not work as expected.

SDK version 1.6.1

CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

  1. Single buffer works as expected:
    1. Setup a buffer of X bytes
    2. Enable UART RX, get UART_RX_BUF_REQUEST event and ignore it.
    3. Transmit X-1 bytes.
    4. Get UART_TX_DONE event
    5. I successfully get an UART_RX_RDY event after X-1 bytes are received.
  2. Double buffer does not work as expected example 1
    1. Setup two buffers of X bytes
    2. Enable UART RX with buffer_1
    3. Get UART_RX_BUF_REQUEST event and pass in buffer_2
    4. Transmit X-1 bytes (less than one buffer's worth)
    5. Get UART_TX_DONE event
    6. Then, nothing! - Here I'm expecting UART_RX_RDY event to signify no more characters have come in.
  3. Double buffer does not work as expected example 2 
    1. Setup two buffers of X bytes
    2. Enable UART RX with buffer_1
    3. Get UART_RX_BUF_REQUEST event and pass in buffer_2
    4. Transmit X+1 bytes.
    5. Get UART_RX_RDY
      UART_RX_BUF_RELEASED (buffer_1)
      UART_RX_BUF_REQUEST-> pass in buffer_1 back in
    6. Get UART_TX_DONE event
    7. Then, nothing! - Here I'm expecting another UART_RX_RDY event to signify no more characters have come in.

What might I be doing wrong? I can confirm the data is in the buffers as expected through the debug watch window.

Parents Reply Children
No Data
Related