<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to configure DTM or radio_test to use different uart pins?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113446/how-to-configure-dtm-or-radio_test-to-use-different-uart-pins</link><description>I&amp;#39;ve got a custom board that puts UART_TX on P0.14 and UART_RX on P0.15, with no RTS or CTS signals. I&amp;#39;ve got a USB to UART cable that I&amp;#39;ve plugged in, and I know at the very least the TX line is working because I&amp;#39;ve seen data go from my custom board</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jul 2024 11:29:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113446/how-to-configure-dtm-or-radio_test-to-use-different-uart-pins" /><item><title>RE: How to configure DTM or radio_test to use different uart pins?</title><link>https://devzone.nordicsemi.com/thread/495803?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 11:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fb5552b-f3b9-4692-96f9-8d2b1acd8864</guid><dc:creator>technically_not</dc:creator><description>&lt;p&gt;Ah, I&amp;#39;ve solved it, after a whole morning of bashing my head against a table. I&amp;#39;ll document it here in case anyone else is having these issues.&lt;/p&gt;
&lt;p&gt;Turns out my modifications to the example radio_test project were on the right lines. I&amp;#39;d tried two things, firstly using my board files from another project and building it for that board, and secondly adding an overlay to the base project and using the nRF52 DK board with my special overlay to remap the UART to the correct pins.&lt;/p&gt;
&lt;p&gt;The reason neither of these worked is that my custom board doesn&amp;#39;t have a low-frequency clock. When originally setting up my other project (that&amp;#39;s building fine for this board) I&amp;#39;d put the configuration that defines how to use the LF clock into the project configuration instead of the board configuration, so it didn&amp;#39;t get copied to the radio_test project. This was preventing the board from ever starting up and reaching main, never mind doing anything else.&lt;/p&gt;
&lt;p&gt;So the answer to the question I asked is to simply build the application targeting a different board with the uart pins defined correctly. Or to add an overlay. My dts now looks like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;\{
...

    chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,uart-mcumgr = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};
};

&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x0 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0xc000 0x32000&amp;gt;;
		};
		slot1_partition: partition@3e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x3e000 0x32000&amp;gt;;
		};
		scratch_partition: partition@70000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0x70000 0xa000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x7a000 0x6000&amp;gt;;
		};
	};
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;,&amp;quot;sleep&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And my defconfig:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52832_QFAA=y
CONFIG_BOARD_YE001_NRF52832=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable RTT
CONFIG_USE_SEGGER_RTT=y

# enable GPIO
CONFIG_GPIO=y

# enable uart driver
CONFIG_SERIAL=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure DTM or radio_test to use different uart pins?</title><link>https://devzone.nordicsemi.com/thread/495784?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 09:56:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13af9f30-df36-4b50-bd96-d16fa5e5bd35</guid><dc:creator>technically_not</dc:creator><description>&lt;p&gt;I forgot to mention that the custom board has the nRF52832 fitted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>