I am running a NUS at 115200 Baud and it works fine but when I run it at 921600 my BMD 300 triggers a Serial Fault. Is there a trick to get the 921600 to work without flow control.
I am running a NUS at 115200 Baud and it works fine but when I run it at 921600 my BMD 300 triggers a Serial Fault. Is there a trick to get the 921600 to work without flow control.
Hi,
The app_uart library used by ble_app_uart can only receie a single byte at a time, causing lots of interrupts for the CPU to update the buffer to receive more bytes. This limits the effective throughput and will give overflow errors on high baudrate/throughput without HWFC.
The Libuarte - advanced UARTE driver was created specifically to resolve this issue, using multiple larger buffers together with timers and PPI to handle switching and timeouts. If you replace app_uart with libUARTE, you should be able to use the higher baudrate.
Here is a good starting point for you!
Best regards,
Jørgen
Hi,
The app_uart library used by ble_app_uart can only receie a single byte at a time, causing lots of interrupts for the CPU to update the buffer to receive more bytes. This limits the effective throughput and will give overflow errors on high baudrate/throughput without HWFC.
The Libuarte - advanced UARTE driver was created specifically to resolve this issue, using multiple larger buffers together with timers and PPI to handle switching and timeouts. If you replace app_uart with libUARTE, you should be able to use the higher baudrate.
Here is a good starting point for you!
Best regards,
Jørgen
Is there an example of this using the BMD 300?
DanielJack said:Is there an example of this using the BMD 300?
No, there are normally no examples in the SDK for specific modules. Since the module is based on a nRF52832 chip, you should be able to use the PCA10040 project with only small modifications (GPIOs, crystals, etc).
How about a Keil based project?
You can copy the Keil project from ble_app_uart, there is just a few files you need to add to the project:
+ <file file_name="../../../../../../components/libraries/libuarte/nrf_libuarte_async.c" />
+ <file file_name="../../../../../../components/libraries/libuarte/nrf_libuarte_drv.c" />
+ <file file_name="../../../../../../components/libraries/queue/nrf_queue.c" />
+ <file file_name="../../../../../../modules/nrfx/drivers/src/nrfx_rtc.c" />
+ <file file_name="../../../../../../modules/nrfx/drivers/src/nrfx_ppi.c" />
+ <file file_name="../../../../../../modules/nrfx/drivers/src/nrfx_timer.c" />
And one path:
../../../../../../components/libraries/libuarte;
Which sdk_config.h do I use? There does not appear to be any libuarte configurations in the UART example.