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

Some UART registers don't change after changing in .overlay

I ran into a problem that some parameters that I change in the device tree are not applied.

For example:
The resulting zephyr.dts file contains this setting:

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


in <devicetree_unfixed.h> these settings are also updated. I am interested in Tx Rx pins.

#define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin 5
#define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rx_pin 6

But when these values are to be written to registers, the register value remains the same. (file nrf_uarte.h)

This happens at the initialization stage of running main.

Why does it work like this? What can block writing to these registers?

I use nRF Connect SDK v1.3.0
Parents Reply
  • Thanks for the answer!
    Do I understand correctly that by describing the spm.conf file I am setting up the SPM functionality?
    Those. it turns out that SPM configures its peripherals (for example uart 0) and therefore my configuration described in the device tree is not applied?

    How can I then find out what is using and overriding SPM?
    I have the same problem with uart1.

    I just tried adding the spm.conf file next to prj.conf. CMakeLists hasn't changed yet.
    Added to it:
    CONFIG_SERIAL = n

    But I did not see any changes, uart0 continues to work on pins 29 and 28.

Children
No Data
Related