Hello, I have recently updated our CLI backend to use LIBUARTE and it seems to be much more reliable. I have a few assumptions I would like to clarify and a few questions as well. This should be helpful to others planning to switch to LIBUARTE.
Assumptions (please correct me if I am wrong):
- LIBUARTE is a replacement to the existing UART and UARTE drivers and interfaces, including app_uart and nrf_serial, and so it is incompatible with them
- This means that all the default values (including `disabled`) should be used for the UART(E) configuration options in the sdk_config (at least for the nRF52480) to avoid conflicts
- Two new timers will need to be allocated for synchronous and asynchronous implementations (async is required by the CLI backend, and async requires the synchronous implementation, so two timers will be needed if using the CLI backend).
- LIBUARTE requires NRFX_PRS_BOX_4 to be set to disabled for the UARTE0 peripheral since it needs to use its own LIBUARTE UARTE0_UART0_IRQHandler
Questions:
- Is there a way to use one timer for both the nrf_libuarte and nrf_libuarte_async implementations?
- When using nrf_libuarte, is there an internal buffer for receiving data or is the only buffer the one provided by the data parameter in nrf_libuarte_rx_start? What I mean is, does nrf_libuarte_rx_start pull the specified (by 'len') number of bytes from an internal buffer or is 'len' the maximum number of bytes to receive until the buffer overflows?
- What happens when the buffer overflows?
- In the async implementation, how often is the NRF_LIBUARTE_ASYNC_EVT_RX_DATA event triggered? At what point would a stream of incoming data be split into multiple events?
- Is there any issue in modifying the current DTM example implementation to use LIBUARTE instead of app_uart?
- Do I need to make a new implementation of retarget.c to work with LIBUARTE instead of app_uart?
Thanks!