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

    Indeed, the nRF52832 only has one UART/UARTE instance available, so you will have to choose one or the other. The reason there is both NRFX_UART_ENABLED and NRFX_UART0_ENABLED is that we have SoCs that have more instances, and the NRFX_UART_ENABLED define only enables the UART peripheral driver, while NRFX_UART0_ENABLED must be set to 1 to enable the instance as well, as the UART_ENABLED define does not set this.

    Best regards,

    Simon

  • thank you Simon. What do you mean by "NRFX_UART_ENABLED define only enables the UART peripheral driver, while NRFX_UART0_ENABLED must be set to 1 to enable the instance as well"?

    what do you mean by the "driver"and the "instance" - are they not basically the same thing? (Ok typically you create an instance in your code and instantiate it in the driver?)

    but the botttom line is both should be enabled? (we have code running that has only one, it does seem to work, although we have some issues we are working on ...)

Reply
  • thank you Simon. What do you mean by "NRFX_UART_ENABLED define only enables the UART peripheral driver, while NRFX_UART0_ENABLED must be set to 1 to enable the instance as well"?

    what do you mean by the "driver"and the "instance" - are they not basically the same thing? (Ok typically you create an instance in your code and instantiate it in the driver?)

    but the botttom line is both should be enabled? (we have code running that has only one, it does seem to work, although we have some issues we are working on ...)

Children
No Data
Related