I am working on a project where we are using a nordic bluetooth chip and connecting it to a RS485 Bus using UART with Baudrate 115200. The messages sent from the Bluetooth App should be assembled in the BUS message and should be sent using UART. For this purpose I am using app_uart_fifo.c with the TX_BUFFER_SIZE and RX_BUFFER_SIZE of 1024.
The problem is that I have to send 16 Bytes of data for every Message Frame and as I have checked with the Oscilloscope, there have been only 12 Bytes being sent by the UART Tx channel.
In order to find the problem, I have simply taken the UART example project from Nordic SDK 13.0 version and implemented the example project with a small change. That is, whenever I send anything on Rx characteristic of the nordic nus service, 16 Bytes should be sent on the UART Tx line. To my surprise, it was sending only 12 or 13 bytes everytime I try to send 16 bytes.
Even though the FIFO is 256 Bytes large, why are the Bytes at the end i.e from 13 to 16 being missed. The Baudrate in the example is also set at 115200.
If your Suggestion is to increase the Baud rate, unfortunately I can't because the RS485 Bus is operated at 115200 and supposed to send data at the same speed.
I am literally stuck with this problem and unable to continue with my project. Any Suggestions would be of great help.
Thanks and regards,
Kumar