Change UART port

Hi,

I started using the Nrf5340-DK with the openthread cli sample. It works fine, and now I'd like to move the main UART to pins P0.24 and P0.26.

To do so, I created an overlay and re-compiled my project with west.

&pinctrl {
    uart0_default: uart0_default {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 26)>;
        };
        group2 {
            psels = <NRF_PSEL(UART_RX, 0, 24)>;
        };
    };

    uart0_sleep: uart0_sleep {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 26)>,
                    <NRF_PSEL(UART_RX, 0, 24)>;
            low-power-enable;
        };
    };
};

When I check the zephyr.dts file, my changes are taken in account, but the UART doesn't work on the new pins.

What am I missing?

Best regards,

Parents
  • Not sure but this is what worked for me on the Dongle board:

    &uart0 {
    pinctrl-0 = <&uart0_default>;
    pinctrl-1 = <&uart0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &pinctrl {
    uart0_default: uart0_default {
    group1 {
    psels = <NRF_PSEL(UART_TX, 0, 10)>;
    };
    group2 {
    psels = <NRF_PSEL(UART_RX, 0, 9)>;
    bias-pull-up;
    };
    };

    uart0_sleep: uart0_sleep {
    group1 {
    psels = <NRF_PSEL(UART_TX, 0, 10)>;
    };
    group2 {
    psels = <NRF_PSEL(UART_RX, 0, 9)>;
    bias-pull-up;
    };
    };
    };
Reply
  • Not sure but this is what worked for me on the Dongle board:

    &uart0 {
    pinctrl-0 = <&uart0_default>;
    pinctrl-1 = <&uart0_sleep>;
    pinctrl-names = "default", "sleep";
    };

    &pinctrl {
    uart0_default: uart0_default {
    group1 {
    psels = <NRF_PSEL(UART_TX, 0, 10)>;
    };
    group2 {
    psels = <NRF_PSEL(UART_RX, 0, 9)>;
    bias-pull-up;
    };
    };

    uart0_sleep: uart0_sleep {
    group1 {
    psels = <NRF_PSEL(UART_TX, 0, 10)>;
    };
    group2 {
    psels = <NRF_PSEL(UART_RX, 0, 9)>;
    bias-pull-up;
    };
    };
    };
Children
Related