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

Newbie: recommended serial driver choice for FreeRTOS app? nrf_drv_uart, nrfx_uart, nrfx_uarte, nrf_serial, nrf_libuarte,...

Hi there!

As a new developer for the nRF5 SDK, the choices are bewildering and I could not find documentation that gives a clear direction. If there is, please share the link(s).

I have been tasked to work on a FreeRTOS project for the nRF52840 that uses SDK 16 but I want to create code that will make it easy to upgrade to SDK 17 later. The FreeRTOS task has to communicate with a GSM module (Quectel M95) with HW flow control (RTS/CTS). The existing code uses the serial port library (nrf_serial set of functions) but it appears to be deprecated and absent in SDK 17.

So my question is: what is the recommended (best practice) serial driver to use in a FreeRTOS app? nrf_drv_uart, nrfx_uart, nrfx_uarte, nrf_serial or nrf_libuarte?

It appears that nrf_drv_uart is old / legacy and should not be used for new development... nrfx_uart is the new recommended driver, right?

Why would the library (e.g. nrf_libuarte) be a better choice over using the driver (e.g. nrfx_uarte) directly?

Thanks in advance,

Pieter

https://piconomix.com

Parents
  • If you have code that rely on nrf_serial in nRF5 SDKv16, then there is no problem to continue to use that in nRF5 SDKv17. The reason nrf_serial was deprecated is that nrf_libuarte is simply better (e.g. with more features), but there is no reason to switch to nrf_libuarte if you already have code successfully working with nrf_serial.

  • Hi Kenneth,

    I'm saying this because I am new to the NRF5 SDK, but there is no "nrf_serial.h" or "nrf_serial.c" in SDK 17.0.0. It is present in SDK 16.0.0 in "components\libraries\serial" but that directory and files are absent in SDK 17.0.0. To me it looks like it was removed which signals that it has been deprecated(?)

    As a person new to the SDK, I want to know what is the recommended choice (to avoid pain in the future).

    Thanks in advance,

    Pieter

Reply
  • Hi Kenneth,

    I'm saying this because I am new to the NRF5 SDK, but there is no "nrf_serial.h" or "nrf_serial.c" in SDK 17.0.0. It is present in SDK 16.0.0 in "components\libraries\serial" but that directory and files are absent in SDK 17.0.0. To me it looks like it was removed which signals that it has been deprecated(?)

    As a person new to the SDK, I want to know what is the recommended choice (to avoid pain in the future).

    Thanks in advance,

    Pieter

Children
Related