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

Is there any possibility to configure UART2 in nRF52 board?

In my project I need two UART,but in nRf52 there is only one dedicated UART. So is it possible to configure GPIO as UART2?

Parents
  • There is no UART2. Your only hope is to use the remaining peripherials in a clever way to implement an UART in software.

    The sending part (NRF52 as the sender) is relatively simple if you can use one of the PWM peripherials - just use them to generate the signal like an UART would do with start and stop bit and so on.

    The receiving part is a lot trickier, because the softdevice will use some CPU time on its own and really does not like to be interrupted at certain points.

    The idea is to use a timer in capture mode. This probably works for low rates up to about 9600 baud and will requires some tricks in the timer interrupt.

    You'll likely want to look at some open source software uart implementations to get how they work in practise. I don't see one for the NRF5x series yet, though.

  • Update: The nRF52840 has two UARTE peripherials. Just use that chip...

Reply Children
No Data
Related