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

How can I map an UART interface on other nrF51422 pins ?

I use a nRF51 dongle for some tests and I want to map the UART interface of UART_example on the pins 15,16,17 and 18 of the Dongle.

I try to juste adapt this lines of code:

#define UART0_CONFIG_PSEL_TXD 16
#define UART0_CONFIG_PSEL_RXD 18
#define UART0_CONFIG_PSEL_CTS 17
#define UART0_CONFIG_PSEL_RTS 15

I have change the number and hope I can see the byte on TXD (the ASCII code with a scope) by example but I think, I forget to make other modifications. Somebody have an idea ?

Parents
  • You can use thoes pins just fine.

    UART0_CONFIG_PSEL_xxx is used in the NRF_DRV_UART_DEFAULT_CONFIG macro. The uart example does not use this macro, it uses

    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        APP_UART_FLOW_CONTROL_ENABLED,
        false,
        UART_BAUDRATE_BAUDRATE_Baud115200
    };
    

    You need to replace the xx_PIN_NUMBER defines with your pins.

Reply
  • You can use thoes pins just fine.

    UART0_CONFIG_PSEL_xxx is used in the NRF_DRV_UART_DEFAULT_CONFIG macro. The uart example does not use this macro, it uses

    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        APP_UART_FLOW_CONTROL_ENABLED,
        false,
        UART_BAUDRATE_BAUDRATE_Baud115200
    };
    

    You need to replace the xx_PIN_NUMBER defines with your pins.

Children
No Data
Related