This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART and UARTE peripherals

I've asked before about these two peripherals, the way they are presented is a little confusing.

I understand that UARTE has DMA possibilities, UART doesn't. Also that in effect there is only one UART on the chip.

In the case that I just want a very simple UART for debugging purposes, with the minimum of config and so on - what is recommended?

Is UARTE a superset of UART, and can be setup as a simple peripheral without using the DMA stuff?

Is it recommended in new designs to use UARTE over UART in new designs? I ask because much UART documentation and driver code seems to be in legacy status now.

Thanks for clarifying.

Parents
  • The way I look at UART/UARTE is that there is only one peripheral with two different access methods.

    If you access the peripheral using UARTE-> -registers, DMA will be enabled automatically. And similarly if you use UART-> -registers, DMA will be disabled.

    Both should be fairly equal in terms of complexity for a simple debug uart.

Reply
  • The way I look at UART/UARTE is that there is only one peripheral with two different access methods.

    If you access the peripheral using UARTE-> -registers, DMA will be enabled automatically. And similarly if you use UART-> -registers, DMA will be disabled.

    Both should be fairly equal in terms of complexity for a simple debug uart.

Children
  • there is this though - a flag to turn off DMA use.

    /**@brief Structure for UART configuration. */
    typedef struct
    {
        uint32_t            pseltxd;            ///< TXD pin number.
        uint32_t            pselrxd;            ///< RXD pin number.
        uint32_t            pselcts;            ///< CTS pin number.
        uint32_t            pselrts;            ///< RTS pin number.
        void *              p_context;          ///< Context passed to interrupt handler.
        nrf_uart_hwfc_t     hwfc;               ///< Flow control configuration.
        nrf_uart_parity_t   parity;             ///< Parity configuration.
        nrf_uart_baudrate_t baudrate;           ///< Baudrate.
        uint8_t             interrupt_priority; ///< Interrupt priority.
    #if defined(NRF_DRV_UART_WITH_UARTE) && defined(NRF_DRV_UART_WITH_UART)
        bool                use_easy_dma;
    #endif
    } nrf_drv_uart_config_t;
  • I think that is just the Nordic uart driver's way of choosing either uart or uarte.

  • no, there are separate files, typedefs, everything, for UART and UARTE.

Related