Correct library and example to follow for serial/UART implementation on nrf52840-dk

Hello,

Just starting off with Nordic hardware and have some basic questions, first my setup:

  • nrf52840-dk development board
  • nRF Connect v2.1.0 SDK
  • Setup to use 2 GPIO pins available on the nrf52840-dk header to interface with a rs485 tranceiver via UART

So first off, I want to make sure I'm working with the right libraries and looking at the right examples.  I stumbled across this older post regarding UART on the nrf52 series but I think that might have just confused me.  That particular link refers to a legacy UART API and suggests using nrf_serial, however I struggle to find that anywhere in the examples provided with my SDK, and looks to be related to the nRF5 v15.0 SDK - is that a subset of the nRF Connect SDK - how do they relate?

Looking at the examples in nRF Connect that are compatible with my board, I see both peripheral_uart and central_uart, which leverage zephyr\drivers\uart.h - I'm assuming that's the right place to start.  But my struggle with these examples is they use the built in UART/virtual COM port on the development board, whereas I want to specify my own GPIO pins.  Where can I find how those pins are set?

Any direction would be appreciated - Thanks

Edit:
I've also stumbled onto this tutorial, again which is referring to the nRF SDK, which seems to be something distinctively different from nRF Connect SDK.  The examples shown are not in the nRF Connect SDK, nor can I find those uart functions anywhere in my entire v2.1.0 library directory.  So I think where I'm struggling is understanding the difference in the SDK's and which one I should be using.

Related