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

Sending many messages

Hi,

I am using the BLE UART central and peripheral to send 100 messages of size 65 bytes (64 bytes + new line) continuously to the peripheral in the hope that I can see the messages on the UART of the central device.

However, I notice that I get about 30-40 messages when sending from Peripheral to Central and about 50-60 messages from central to Peripheral.

I also see that when the transmission stops there is a APP_UART_FIFO_ERROR error at the sender. What is the size of the FIFO buffer?

This is consistent across many tests. In the peripheral device, it goes to the  NRF breakpoint condition and it has to reset to start and I have at that point lost the messages. This is not something I observe when I sent messages of size 33 (32+1) bytes. Can you think why this could be the case? Also is there a way I can get it to work,

Thanks

Parents
  • Hi,

    I want to start with the first question that came to mind: have you started the crystal oscillator? That is generally a good idea when using UART. Failing to do so can result in a too large clock inaccuracy, leading to framing errors.

    I also see that when the transmission stops there is a APP_UART_FIFO_ERROR error at the sender.

    This could be caused by several things. Have you checked the additional error code in the app_uart_evt_t instance?

    What is the size of the FIFO buffer?

     That is configured by the second and third parameters in APP_UART_FIFO_INIT().

  • I am using the given example and so I assume that the correct settings have been applied.

     I also see this issue when I send 16 & 32 bytes messages for a higher number of messages. So it looks like the FIFO gets filled no matter the size and the bigger size only makes the issue come up earlier.

    This is surprising.

    WIth a 115200 baud rate, I can sent 11520 bytes per second.

    I am sending messages every 10ms so I should be able to send 115.2 or 115 bytes every 10ms. However, I am not able to send even 64, 32 or even 16 bytes. I haven't tried 8 bytes yet.

    Thanks

Reply
  • I am using the given example and so I assume that the correct settings have been applied.

     I also see this issue when I send 16 & 32 bytes messages for a higher number of messages. So it looks like the FIFO gets filled no matter the size and the bigger size only makes the issue come up earlier.

    This is surprising.

    WIth a 115200 baud rate, I can sent 11520 bytes per second.

    I am sending messages every 10ms so I should be able to send 115.2 or 115 bytes every 10ms. However, I am not able to send even 64, 32 or even 16 bytes. I haven't tried 8 bytes yet.

    Thanks

Children
Related