Hello All,
I have 2 evaluation boards nrf52840 EVB "PCA10056".
I would like to run on them the "ble_app_uart" in "nRF5_SDK_15.3.0_59ac345" as following:
- A custom board send via uart a buffer of "N" characters ending with "\n" to the peripheral on the pin P0.26 every "S" ms.
- The Board "peripheral" send this packet via bluetooth to the "central board" (where I uploaded the "ble_app_uart_c" code)
- The "central board" print via uart the packet received.
At the beginning, if for example I increased the distance between the 2 Evaluation boards or moved them quickly, a disconnection occurred because the "peripheral" went to "APP_UART_COMMUNICATION_ERROR" (I believe that an interrupt of the softdevice with higher priority of the UART is triggered and the byte on the UART is not read) but, despite the disconnection, the custom board continued to send data over the Uart to the peripheral, which could no longer get out of this error.
So checking on the forum and thanks to some tickets like this:
https://devzone.nordicsemi.com/f/nordic-q-a/23796/app-uart-communication-error/93601#93601
I was able to manage this error commenting out " APP_ERROR_HANDLER" in case APP_UART_COMMUNICATION_ERROR, but ignoring the communication error on UART I have some loss of data.
This data loss drags my throughput down dramatically, because if my buffer instead of having N characters has less, it can't be sent to the central device over Bluetooth.
I could decrease "S", but I have experimentally noticed that decreasing "S" the frequency of the error increases and therefore under a certain value of "S" I don't get more improvements.
In another ticket I've read about LIBUARTE:
but to be honest I did not get how can I change the ble_app_uart using this library (if it is a solution).
Anyone can help me?
Thanks