This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using multiple UART instances on the nrf52840

Hello,

Here's my current setup:

I am using the nrf52840 SoC for development, which as I understand, has 2 UART instances available. One instance is being used for a third party chip. This means I am no longer able to use UART for logging (I had to disable the UART backend and enable the RTT backend instead).

Now I would very much like to use the UART backend for logging, as I am particularly interested in using the CLI commands feature for doing some automated testing.

So, how do I make use of the other UART instance, and possibly bind it to the logger UART backend?

Thanks Slight smile

Parents
  • You are using the nRF52840 chip or you are using Nordic's development board based off the chip? Two rather different things. If you are using the chip in a custom design you can do whatever you want, if you are using the nRF52840 dev kit then yes one of the two UARTs is presented via a USB-CDC device as a serial port. You can just open that serial device on your PC/linux box/mac and read it as a .. serial device and you can log via the UART backend. That's the point of the logging interface, you can select whether it's presented via RTT or through the UART. And if you want to connect directly to the UART with a UART you can cut the solder bridges (see the manual). 

    I think you're overcomplicating it - yes one UART goes via a third party chip, however it does that in order that you can open it as a serial device on your computer, it's not stolen from you, it's made available to you in a consumable form. I think that's what you actually want. 

  • Maybe I wasn't very clear - what I'm really asking is how to enable/initialize both instances and have them running at the same time?

  • Hi Timothy

    Are you able to assign UARTE1 to your third party chip rather than UARTE0?

    Then it should be quite straight forward to enable logging on UARTE0 like normal. 

    For this to work you have to enable both UART's in the sdk_config.h file. 

    Best regards
    Torbjørn

Reply Children
No Data
Related