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

With NRF52840 UARTE0, I need to increase the buffer size from 1 byte to 64 bytes. But with this cannot receive 1 byte packet.

Hi,

I'm using a buffer size of 64 bytes using function

nrf_drv_uart_rx(&app_uart_inst, rx_buffer, 64);

When I receive only one byte packet from the remote, I get EVENT_RXDRDY (which I expect). I then wait for about 10 ms.

1. EVENT_RXDRDY

2. delay_ms(10)

3. trigger FLUSHRX

4. Read UARTE register AMOUNT

I get AMOUNT = 0 all the time

Why I'm not getting AMOUNT = 1?

This code works if the buffer size is set to 1.

Please help. Let me know I need to do some trick.

Parents Reply
  • Hi Jared,

    From the source of the UART character, I send one character to NRF52840 and I get EVENT_RXDRDY in step 1. All other steps do not see EVENT_RXDRDY. According to the document of NRF52840, after TASK_FLUSHRX in step 3, I'm supposed to see EVENT_ENDRX (please correct me) but I never do. In my application, I cannot send any stop command and here I've not sent TASK_STOPRX at all. I've attached the whole project herewith. The directory it is

    C:\nordic\nRF5SDK160098a08e2\myprojects\peripheral

    7271.usbd_cdc_acm.zip

Children
Related