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

Can not config UART 1, if using UART 2 or 3 the program works fine

Hey all,

I have started working with this board around a month ago, and start to understand it little by little. I have a program that communicates with a display over UART. It works well when it is configured with UART 2 or 3. But when I try to configure with UART 1 it does not work. I did some reading on the forum and I found that you should add CONFIG_BSD_LIBRARY_TRACE_ENABLED=n in prj.conf but this also did nothing.  So I would have just used UART 2 or 3 for the display, but this is also not an option because I have two other devices that use UART. And need 3 UART for the final system. The config file and overlay file are listed beneath. (UART 2 and 3 are config the same but I just change the number). Do you maybe know how to configure UART 1, or what I am doing wrong? NCS version: 1.3.0, Board: nrf9160dk_nrf9160 and I use SES V4.52.

.prj file:

CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_SPI_1=n
CONFIG_I2C_1=n

overlay file:

&uart1 {
    current-speed = <57600>;
    status = "okay";
    tx-pin = <19>;
    rx-pin = <17>;
    rts-pin = <0xFFFFFFFF>;
    cts-pin = <0xFFFFFFFF>;
};

Thanks in advance for your time

Parents
  • Hey Susheel,

    I finnaly found the solution. I changed uart 1 at nrf9160dk_nrf9160_common (\ncs\v1.3.0\zephyr\boards\arm\nrf9160dk_nrf9160) and changed it to:

    &uart1 {
        tx-pin = <24>;
        rx-pin = <23>;
    };

    And my overlay and prj could stay the same as before.

    .prj file:

    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y

    CONFIG_SPI_1=n
    CONFIG_I2C_1=n

    overlay file:

    &uart1 {
        current-speed = <9600>;
        status = "okay";
        tx-pin = <0xFFFFFFFF>;
        rx-pin = <17>;
        rts-pin = <0xFFFFFFFF>;
        cts-pin = <0xFFFFFFFF>;
    };

    I want to thank you for your time and help Slight smile

Reply
  • Hey Susheel,

    I finnaly found the solution. I changed uart 1 at nrf9160dk_nrf9160_common (\ncs\v1.3.0\zephyr\boards\arm\nrf9160dk_nrf9160) and changed it to:

    &uart1 {
        tx-pin = <24>;
        rx-pin = <23>;
    };

    And my overlay and prj could stay the same as before.

    .prj file:

    CONFIG_SERIAL=y
    CONFIG_UART_INTERRUPT_DRIVEN=y

    CONFIG_SPI_1=n
    CONFIG_I2C_1=n

    overlay file:

    &uart1 {
        current-speed = <9600>;
        status = "okay";
        tx-pin = <0xFFFFFFFF>;
        rx-pin = <17>;
        rts-pin = <0xFFFFFFFF>;
        cts-pin = <0xFFFFFFFF>;
    };

    I want to thank you for your time and help Slight smile

Children
No Data
Related