What is the difference between bm_lpuart* and nrfx_uarte* ?

Hi,

Can someone please explain the difference between bm_lpuart_* and nrfx_uarte_* drivers in nRF Connect Bare Metal SDK ?

Parents
  • Hello,

    Hope it's okey I copy and paste the response from our chatbot in this case, which I think summarized better than I could. Let me know if something is unclear and I can look into it.

    Kenneth

    --

    In the Bare Metal option you effectively have two layers of UART-related drivers:

    1. nrfx_uarte_* – low‑level, generic HAL driver

      • Comes from the nrfx HAL that is shared with the full nRF Connect SDK.
      • Intended as the primary low‑level peripheral driver in Bare Metal; you include it directly (for example #include <nrfx_uarte.h>) and configure the UARTE registers and events yourself. [nrfx driver]
      • It exposes the UARTE peripheral “as is” (TX/RX with EasyDMA, interrupts, etc.), but does not implement any higher‑level low‑power protocol on top.
    2. bm_lpuarte_* – higher‑level Bare Metal Low Power UARTE driver

      • This is a Bare Metal–specific driver located under nrf-bm/drivers. [Drivers overview]
      • It implements a Low Power UART with EasyDMA (LPUARTE) on top of the standard UARTE, using two extra GPIO lines:
      • These control lines are used to turn the receiver on only when needed, so the HF clock can be shut down while idle, giving significantly lower power consumption.
      • The protocol is implemented in the bm_lpuarte_* API:
        • bm_lpuarte_init(), bm_lpuarte_uninit()
        • bm_lpuarte_tx(), bm_lpuarte_tx_in_progress(), bm_lpuarte_tx_abort()
        • bm_lpuarte_rx_enable(), bm_lpuarte_rx_buffer_set(), bm_lpuarte_rx_abort() [bm_lpuarte API; LPUARTE driver]

    How to think about the difference

    • Use nrfx_uarte_* when you want:

      • Direct, low‑level control of the UARTE peripheral.
      • A generic driver similar to what you use in Zephyr‑based nRF Connect SDK.
    • Use bm_lpuarte_* when you want:

      • A ready‑made low‑power UART solution with REQ/RDY handshake.
      • A higher‑level API that manages the control protocol and receiver on/off behavior for you, built specifically for Bare Metal. [LPUARTE driver]

    Both are in scope for Bare Metal, but bm_lpuarte_* is a Bare Metal helper driver built on top of the underlying nrfx UARTE functionality, while nrfx_uarte_* is the base peripheral driver.

Reply
  • Hello,

    Hope it's okey I copy and paste the response from our chatbot in this case, which I think summarized better than I could. Let me know if something is unclear and I can look into it.

    Kenneth

    --

    In the Bare Metal option you effectively have two layers of UART-related drivers:

    1. nrfx_uarte_* – low‑level, generic HAL driver

      • Comes from the nrfx HAL that is shared with the full nRF Connect SDK.
      • Intended as the primary low‑level peripheral driver in Bare Metal; you include it directly (for example #include <nrfx_uarte.h>) and configure the UARTE registers and events yourself. [nrfx driver]
      • It exposes the UARTE peripheral “as is” (TX/RX with EasyDMA, interrupts, etc.), but does not implement any higher‑level low‑power protocol on top.
    2. bm_lpuarte_* – higher‑level Bare Metal Low Power UARTE driver

      • This is a Bare Metal–specific driver located under nrf-bm/drivers. [Drivers overview]
      • It implements a Low Power UART with EasyDMA (LPUARTE) on top of the standard UARTE, using two extra GPIO lines:
      • These control lines are used to turn the receiver on only when needed, so the HF clock can be shut down while idle, giving significantly lower power consumption.
      • The protocol is implemented in the bm_lpuarte_* API:
        • bm_lpuarte_init(), bm_lpuarte_uninit()
        • bm_lpuarte_tx(), bm_lpuarte_tx_in_progress(), bm_lpuarte_tx_abort()
        • bm_lpuarte_rx_enable(), bm_lpuarte_rx_buffer_set(), bm_lpuarte_rx_abort() [bm_lpuarte API; LPUARTE driver]

    How to think about the difference

    • Use nrfx_uarte_* when you want:

      • Direct, low‑level control of the UARTE peripheral.
      • A generic driver similar to what you use in Zephyr‑based nRF Connect SDK.
    • Use bm_lpuarte_* when you want:

      • A ready‑made low‑power UART solution with REQ/RDY handshake.
      • A higher‑level API that manages the control protocol and receiver on/off behavior for you, built specifically for Bare Metal. [LPUARTE driver]

    Both are in scope for Bare Metal, but bm_lpuarte_* is a Bare Metal helper driver built on top of the underlying nrfx UARTE functionality, while nrfx_uarte_* is the base peripheral driver.

Children
Related