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

UART / Serial APIs for single character tx/rx

I am working on developing a UART driver. I am looking for APIs that support this. I see 3 sets of implementation examples:

1. nrf_serial

2. nrf_drv_uart

3. nrfx_uart

Which is the best option for me to choose as my requirement is just 1 character Tx and Rx at a time

Also, is the serial_xxx old implementation?

Parents Reply
  • I am looking for IRQ based implementation without easy DMA.

    This QA suggests I use nrf_serial which used nrfx_uart instead of app_uart in UART example.

    Any suggestion on sequence of APIs nrfx_uart APIS that I must use in sequence? Does the below sequence do?

    1. nrfx_uart_init() -> with nrfx_uart_event_handler_t  event_handler for IRQ handling during Rx

    2. nrfx_uart_tx() -> whenever I want to transfer a byte

    3. Event handler will be called automatically on IRQ for RX

    Should I take care of anything more?

Children
Related