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

UART APIs in Peripheral and Common SDK

What is the difference between APIs in below sections:

 app_uart_xxx  ( under nRF5 SDK v15.3.0 > API Reference > SDK common libraries

nrfx_uart_xxx ( under  nRF5 SDK v15.3.0 > API Reference > Peripheral drivers > Peripheral drivers )?

And I understand we must use the APIs which are NOT legacy. Please clarify

Parents
  • Hi,

    So 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.

    Best regards,
    Kenneth

Reply
  • Hi,

    So 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.

    Best regards,
    Kenneth

Children
No Data
Related