Hi,
I am working on the nRF9151 DK (nrf9151dk_nrf9151ns) and need to use an additional UART for communication with an external ESP32.
Currently:
-
UART0 is used for console/debug.
-
UART1 is used by the LTE modem.
Therefore, I am attempting to enable UART2 for external communication.
After reviewing the board schematic, I found that P0.02 and P0.03 are not used by any active peripherals in my setup. These pins are routed to the Arduino header, and since no shield is connected, I assume they can be reassigned.
I have added the following overlay:
nrf9151dk_nrf9151ns.overlay
&uart2 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart2_default>;
pinctrl-names = "default";
};
&pinctrl {
uart2_default: uart2_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 2)>,
<NRF_PSEL(UART_RX, 0, 3)>;
};
};
};
In prj.conf I have enabled:
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_NRFX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_2_ASYNC=y
CONFIG_UART_2_NRF_HW_ASYNC=y
My understanding is:
-
UART2 is available on the nRF9151 SoC.
-
P0.02 is configured as TX.
-
P0.03 is configured as RX.
-
These pins should be usable since they are not actively assigned elsewhere.
Could you please confirm:
-
Is UART2 supported and available on nRF9151 DK?
-
Are P0.02 and P0.03 safe to use for UART2?
-
Is there anything missing in the overlay or Kconfig for enabling UART2 properly?
Thank you.