2 years, 1 month ago.

How to use both UART in nrf52840 dev Kit

Hey,

I have nrf52840 dev kit. i can see only one UART port available at P0_8, P0_6. can i use both UART in the dev Kit? how? Is there any working example available for both UART working. They used a concept of Easy DMA that confused me a bit there is not a good documentation available too.

Thanks

Comment on this question

1 Answer

2 years, 1 month ago.

According to the Nordic forums you can use any GPIO pin as UART by setting the PSEL register. You'd probably need to use Nordic's SDK (embedded in mbed OS 5) for that as I don't think it's exposed by mbed HAL. Perhaps best to ask at Nordic DevZone.

Hi Suraj,
Mbed can support pin assign change without any addtional effort.
Just write port(pin) name in Serial class.
You can see two example as follows.
/users/kenjiArai/code/BLE_I2C_pin_assign/
/users/kenjiArai/code/BLE_UART_pin_assign/
These are nRF51 program but I believe you can use it for nRF52.

posted by Kenji Arai 01 Sep 2017

Hey Kenji,

Can you please provide a example where both UART working in nRF52840. I am trying but only 1 works for me. I want to make one as to print debug messages and another to talk with Cellular Modem.

thanks in advance

posted by Suraj Pal 07 Sep 2017