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

NRF UART Error at Higher Baud Rate

My requirement is to send from Controller Device to NRF Ble Device through UART of 40Bytes at the rate of less than 1ms. Currently I am using ble_app_uart example as a reference.  

According to Nordic forum UART/UARTE Not able to handle data well at higher Baud Rate. The Overrun Error occurs because of the Byte by Byte data receiving mechanism.

Nordic SDK: 17.0.2

So My question as follows:

1. By using UART/UARTE Can i achieve 921600 or higher baud rate.  

2. If not why? Please send me a reason.

3. If Yes. Please send me a reference.

By Referring the Nordic Forum i get to know by using libuarte-advanced UARTE driver I can achieve higher baud rate. Is this Correct.

So My question as follows:

1. Is 921600 baud rate achievable.

2.  Please send me a Integration Guide with BLE Peripheral Examples(eg,. ble_app_uart).

 3. If there send me a ble peripheral example with libuarte for my refernce.

Parents
  • Hi Pavan,

    The HW in itself can send and transmit at higher baud rate and that is not a problem. But the overall transactions are not just depending on UART but many other factors.

    1. HW Flow control enabled?
    2. Speed of pre and post-processing of each transaction on nRF side and the peer side.
    3. Overrun errors are normally caused because of two reasons
      1. if you have not enabled the flow control and the peer is sending data faster than your application can process. This depends on many things, The application context priority with you are processing the received bytes, the latency of post-processing etc. This is not purely hardware controlled, but you need to make some software architectural decisions to support such a high bandwidth of uart in your application.
      2. if you have enabled the flow control, it is still possible that by the time the UART FIFO buffers are full and by the time it can pull the CTS line low, the peer might have already transmitted few more bytes causing the overrun bits to set.

    My point is that if you want such high throughputs on UART for your application, make sure you have HW flow control enabled and also make sure that you are processing the TX/RX bytes at a maximum priority allowed. If you are using softdevice for BLE traffic, there might be more bottlenecks to achieve that high bandwidth since BLE activity always has the highest priority and can cause your UART handling to lag.

  • Hi susheel,

    BLE Configuration:
    Notification Data Payload : 37
    ATT_MTU: 40
    GAP Data Length: 44

    Connection Interval: 7.5ms
    Gap Event Length: 400(500ms) and 6(7.5)
    hvn_tx_queue_size: 6/12

    what is the default size of HVN TX QUEUE SIZE.

    So My query:
    If i set ATT MTU 247 and Gap Data Length 251
    How many packets will send in one connection interval(7.5ms) on 1m distance as well as 12m distance with worst condition. Is characteristic value data payload and (ATT_MTU-3) & (GAP Data length = ATT_MTU+4)should be same.


    If i set ATT MTU 40 and Gap Data Length 44
    How many packets will send in one connection interval(7.5ms) on 1m distance as well as 12m distance with worst condition.


    what is the maximum time required to send one packet of 40bytes. is it varies according to environment surrounding.

    According to softdevice s132 document(S132_SDS_v7.1.pdf) what do you mean by application can configure tndist on page 54. If so, how we can do that?

    Instead of sending 1ms if i send 111bytes every 3ms can i achieve constant throughput till 11m on worst condition.

    Please suggest the best possible configuration need to send data 37bytes in 1ms , 74bytes in 2ms or 111bytes in 3ms.

Reply
  • Hi susheel,

    BLE Configuration:
    Notification Data Payload : 37
    ATT_MTU: 40
    GAP Data Length: 44

    Connection Interval: 7.5ms
    Gap Event Length: 400(500ms) and 6(7.5)
    hvn_tx_queue_size: 6/12

    what is the default size of HVN TX QUEUE SIZE.

    So My query:
    If i set ATT MTU 247 and Gap Data Length 251
    How many packets will send in one connection interval(7.5ms) on 1m distance as well as 12m distance with worst condition. Is characteristic value data payload and (ATT_MTU-3) & (GAP Data length = ATT_MTU+4)should be same.


    If i set ATT MTU 40 and Gap Data Length 44
    How many packets will send in one connection interval(7.5ms) on 1m distance as well as 12m distance with worst condition.


    what is the maximum time required to send one packet of 40bytes. is it varies according to environment surrounding.

    According to softdevice s132 document(S132_SDS_v7.1.pdf) what do you mean by application can configure tndist on page 54. If so, how we can do that?

    Instead of sending 1ms if i send 111bytes every 3ms can i achieve constant throughput till 11m on worst condition.

    Please suggest the best possible configuration need to send data 37bytes in 1ms , 74bytes in 2ms or 111bytes in 3ms.

Children
No Data
Related