Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Serial port library - two instances

Hi

I'm using SDK version15.2 and SD on a custom board based on nRF52840.

The board has two serial ports, and I want to use both independently. Using the Serial Port Library Example with two UARTEs example: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v13.0.0%2Fserial_example.html and modifying it to use NRF_SERIAL_MODE_IRQ and custom pin numbers (different for the two ports), I have this code:

When I'm initializing the serial ports with this code:

... Fatal error ! ... or more specific "NRFX_ERROR_INVALID_STATE"  originating from nrfx_uart_init() in nrfx_uart.c. examining the function it enters these statements:

So it seems that uart is already initialized? why? Any ideas what can be wrong?