This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uart0 setting in device tree

Hi I am using the aws_iot example on the nrf9160 DK.

I have opened the zephyr.dts file and in the section uart0: it has the following 

uart0: uart@8000 {
				compatible = "nordic,nrf-uarte";
				reg = < 0x8000 0x1000 >;
				interrupts = < 0x8 0x1 >;
				status = "okay";
				label = "UART_0";
				current-speed = < 0x1c200 >;
                                tx-pin = < 0x1d >;
				rx-pin = < 0x1c >;
				rts-pin = < 0x1b >;
				cts-pin = < 0x1a >;
			};

I've reached this point trying to change the pins that the console outputs. But whatever change I may do at this point there is no effect.

I continue to get normal logging in the LTE Link monitor application. I even deleted the section and it still works as before.

It seems that it is taking this info from elsewhere but where?

Parents
  • Hello!

    zephyr.dts is generated when you build your project, which is why changing it has no effect.

    You can see how this file is generated and learn more about the Zephyr devicetree here.

    In order to overwrite these values you can include a devicetree overlay file in your project.

    Best regards,

    Einar

Reply
  • Hello!

    zephyr.dts is generated when you build your project, which is why changing it has no effect.

    You can see how this file is generated and learn more about the Zephyr devicetree here.

    In order to overwrite these values you can include a devicetree overlay file in your project.

    Best regards,

    Einar

Children
  • I have included the following overlay to root the uart0 signals to where uart1 signals normally are.

    &uart0 {
    tx-pin = < 0x1 >;
    rx-pin = < 0x0 >;
    rts-pin = < 0xe >;
    cts-pin = < 0xf >;
    };

    &uart1 {
    tx-pin = < 0x1d >;
    rx-pin = < 0x1c >;
    rts-pin = < 0x1b >;
    cts-pin = < 0x1a >;
    };

    I indeed stopped receiving from VCOM0 as expected, (VCOM1 now only outputs the bootloader messages) but I am not receiving anything from VCOM2 that uart1 is normally connected as I would expect.. Any ideas?   

  • Hi

    What do the uart nodes in your zephyr.dts look like now?

    Have you tried enabling uart1 and using that instead of swapping around on the pin settings to use the same pins?

    Best regards,

    Einar

Related