Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
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

please clarify UART / UART0 in SDK

in sdk_config.h  it says this

// <e> NRFX_UART_ENABLED - nrfx_uart - UART peripheral driver
//==========================================================
#ifndef NRFX_UART_ENABLED
#define NRFX_UART_ENABLED 1
#endif
// <o> NRFX_UART0_ENABLED - Enable UART0 instance 
#ifndef NRFX_UART0_ENABLED
#define NRFX_UART0_ENABLED 0
#endif
on page 24 of the nRF52832 datasheet, it seems that UART and UARTE cannot both be used (they share the same ID). Is this correct? effectively only one UART on this device? and then what do UART and UART0 refer to in the sdk config?
thank you
Parents
  • Hi

    I understand the confusion, but no these defines aren't exactly the same. As the driver ENABLE define won't specify what instance to use in the UART drivers/libraries of the SDK. Both NRFX_UART_ENABLED and NRFX_UART0_ENABLED should be set to 1.

    Our example projects in the nRF5 SDK use the UART_ENABLED and UART0_ENABLED defines by default, as they use the nrf_drv_uart driver to enable the UART and UART instance by default. 

    Best regards,

    Simon

Reply
  • Hi

    I understand the confusion, but no these defines aren't exactly the same. As the driver ENABLE define won't specify what instance to use in the UART drivers/libraries of the SDK. Both NRFX_UART_ENABLED and NRFX_UART0_ENABLED should be set to 1.

    Our example projects in the nRF5 SDK use the UART_ENABLED and UART0_ENABLED defines by default, as they use the nrf_drv_uart driver to enable the UART and UART instance by default. 

    Best regards,

    Simon

Children
Related