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
  • Hi, 

    There are various UART drivers and libraries in the nRF SDK, e.g. app_uart ("old" lib), libuarte ("new" lib), nrf_drv_uart ("old" driver) and nrfx_uarte ("new" driver).

    They provide different abstraction and functionality of using the UART peripheral in an application.

    In general the nrfx* is the low level driver that give you full control over the peripheral, while the app*/lib* library give you more high level api where you don't need to think about the low level hardware registers.

    Which to use depends on your requirements, if you find that the app*/lib* provide the functionality you need then there is no need to use the nrfx* driver.

    I will suggest you take a look at the following examples and start from them 

    nRF5 SDK v15.3.0: UART Example

    nRF5 SDK v15.3.0: UART/Serial Port Emulation over BLE

    Best regards,

    Amanda

Reply
  • Hi, 

    There are various UART drivers and libraries in the nRF SDK, e.g. app_uart ("old" lib), libuarte ("new" lib), nrf_drv_uart ("old" driver) and nrfx_uarte ("new" driver).

    They provide different abstraction and functionality of using the UART peripheral in an application.

    In general the nrfx* is the low level driver that give you full control over the peripheral, while the app*/lib* library give you more high level api where you don't need to think about the low level hardware registers.

    Which to use depends on your requirements, if you find that the app*/lib* provide the functionality you need then there is no need to use the nrfx* driver.

    I will suggest you take a look at the following examples and start from them 

    nRF5 SDK v15.3.0: UART Example

    nRF5 SDK v15.3.0: UART/Serial Port Emulation over BLE

    Best regards,

    Amanda

Children
Related