Where to find DT Overlay errors?

I'm setting up a board I just built in NCS, and I made an overlay file for it.  Specifically, I am setting up the UART21 peripheral and assigning pin outputs.  I made a mistake of assigning the wrong pins for UART21 (P2.08 and P2.09 rather than P2.07 and P2.08).  

I thought to just try out my pin configuration in the overlay file, and see if it'll work.  NCS builds it, flashes it, and the code runs.  But there is no indication that anything is wrong besides the UART output not actually going anywhere.  As in, there isn't a compile time error, nor a run-time error.  Is this expected?

Also, why is there a PSEL register at all if there is only 1 valid value for the pin?

DevZone AI response follow up:  The AI suggested that I can set UARTE21 pins to any pins within P1.  I tried this but none of them actually output any serial data like I got on P2.08.  II also tried setting UARTE21.TXD to P2.02 as that's on the datasheet dedicated function list, but that doesn't work.  

Here is the overlay file:

/ {
	aliases {
		ledonboard = &led_debug_0;
	};

	leds {
		compatible = "gpio-leds";

		led_debug_0: led_0 {
			gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
		};
	};
};

&pinctrl {
	uart21_default: uart21_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 2, 2)>;
		};

		group2 {
			psels = <NRF_PSEL(UART_RX, 2, 0)>;
			bias-pull-up;
		};
	};

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

&uart21 {
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&uart21_default>;
	pinctrl-1 = <&uart21_sleep>;
	pinctrl-names = "default", "sleep";
};

Another thing I observed is that the `psels` fields in the `zephyr.dts` file would only have 1 of the 2 pins set as connected (the leading bit of the psel register).  Is this expected?

Parents
  •    Thanks for the responses and info.

    I tried using the pins on Port1 today, and for some reason, this time it worked.  I tried port 1 last night  and it wasn't receiving any bytes. Today, it's working.  I'm not sure what's different today.

    Would the constant latency flag only affect receiving bytes?  I was having issues last night getting the UART to receive bytes on P2.07, while it was fine transmitting bytes on P2.08.  

    Also, I'm using NCS v3.4.0 and if I only use the CONFIG_SOC_NRF_FORCE_CONSTLAT=y flag, it gives an error of "CONFIG_SOC_NRF_FORCE_CONSTLAT was assigned the value y, but got the value n. Missing dependencies: NRF_SYS_EVENT".  Is this expected?

Reply
  •    Thanks for the responses and info.

    I tried using the pins on Port1 today, and for some reason, this time it worked.  I tried port 1 last night  and it wasn't receiving any bytes. Today, it's working.  I'm not sure what's different today.

    Would the constant latency flag only affect receiving bytes?  I was having issues last night getting the UART to receive bytes on P2.07, while it was fine transmitting bytes on P2.08.  

    Also, I'm using NCS v3.4.0 and if I only use the CONFIG_SOC_NRF_FORCE_CONSTLAT=y flag, it gives an error of "CONFIG_SOC_NRF_FORCE_CONSTLAT was assigned the value y, but got the value n. Missing dependencies: NRF_SYS_EVENT".  Is this expected?

Children
No Data
Related