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

Can nRF52840's all pins work uart?

Dear all.

I know the nRF52840 has 2 uart module.

I've been used only 1 uart setting like below pin connecting in 52840 DK reference doc.

But now i have to use 2 of uart which 52840 has

So what my curiosity is Can nRF52840's all gpio pins work uart? 

I want to use both of them.

e.g. if uart0 is set like p0.09, p0.10, p.0.11, p0.12

and uart1 is p0.13, p0.14, p0.15, p0.16, Am i using correct?

Also, for this, all I have to do is changing RX_PIN_NUMBER, TX_PIN_NUMBER and connecting with pins i want to use

and add some of code to set another uart?

 

thanks.

best regard.

Parents
  • Hi

    Yes, there is no limit to which GPIO's can be used for either of the two UART interfaces, you just have to ensure that you don't assign multiple functions to the same pin. 

    The DK uses pins P0.05-P0.08 in order to connect to the UART interface of the program and debug chip, but if you make your own board you can reassign these to whatever you like. 

    It's worth mentioning that the app_uart driver is not instanced, which means you can not run multiple instances of it accessing different UART interfaces. 
    I would recommend using the newer nrf_serial interface for one or both of the UART's, as this library does support instancing. 

    Best regards
    Torbjørn

Reply
  • Hi

    Yes, there is no limit to which GPIO's can be used for either of the two UART interfaces, you just have to ensure that you don't assign multiple functions to the same pin. 

    The DK uses pins P0.05-P0.08 in order to connect to the UART interface of the program and debug chip, but if you make your own board you can reassign these to whatever you like. 

    It's worth mentioning that the app_uart driver is not instanced, which means you can not run multiple instances of it accessing different UART interfaces. 
    I would recommend using the newer nrf_serial interface for one or both of the UART's, as this library does support instancing. 

    Best regards
    Torbjørn

Children
Related