<?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 Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66396/how-to-map-uarte-to-physical-pins</link><description>Hello, 
 I am a newby to the nRF5340 and Zephyr and I am stuck. I would like to know how to map physical pins to a particular UARTE. 
 I have read in the user manual OPS_v0.6.1 that this can be configured using these registers PSEL.RXD, PSEL.CTS, PSEL</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Sep 2020 08:35:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66396/how-to-map-uarte-to-physical-pins" /><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271984?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 08:35:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72cfb594-23c1-4bc1-b596-3b44453d1da9</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Good to hear! You got it right!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It was my pleasure.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271855?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 15:42:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35aab4eb-bbc7-483a-91b0-3417314fd12f</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Thank you Carl,&lt;/p&gt;
&lt;p&gt;I have read the OPS_v0.6.1 again and the penny has finally dropped &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f4a1.svg" title="Bulb"&gt;&amp;#x1f4a1;&lt;/span&gt;. I can now see how the&amp;nbsp;&lt;strong&gt;PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD&lt;/strong&gt;&lt;span&gt;&amp;nbsp;can be used to map the different signals (RXD, CTS...), to physical pins.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for being patient with me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271834?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 14:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d28ad9-c6af-4735-a6dd-15793ccec656</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;It&amp;#39;s fine! This happens in the driver, &lt;strong&gt;&amp;lt;sdk_root&amp;gt;\zephyr\drivers\serial\uart_nrfx_uarte.c&lt;/strong&gt;, where the Devicetree(DT) configuration is applied to the UART instance.&amp;nbsp;We do not have any examples on using the registers directly, unfortunately.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271766?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 12:05:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7d3df46-6a41-4f84-8a7c-4a128256d84a</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Hi Carl,&lt;/p&gt;
&lt;p&gt;I am sorry to be a pain but I still&amp;nbsp;cannot see&amp;nbsp;how you can use the registers&amp;nbsp;&lt;strong&gt;PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD&lt;/strong&gt;&lt;span&gt;&amp;nbsp;to map the different signals (RXD, CTS...), to physical pins. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please can you give an example on how you would use these registers to map RXD, CTS,... signals to physical pins?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271763?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94030a0b-82bd-4671-8c0e-442d846afa98</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again, Mohamed.&lt;br /&gt;&lt;br /&gt;It is not explained explicitly in the tutorial, but it does show how the .overlay files are translated into #defines which in turn are used by the drivers(where the registers you mention are set). You can access the registers directly as well, as hinted to by our documentation. However, I recommend using the .overlay files, as mentioned.&lt;br /&gt;&lt;br /&gt;Best of luck,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271744?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 11:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8395e9c-3f9d-45ab-8288-5a9731bb3c92</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Thank you Carl for your prompt response.&lt;/p&gt;
&lt;p&gt;I have gone through the tutorial. It covers the Device Tree concept in section 1.4 but nothing on how to use the registers&amp;nbsp;&lt;strong&gt;PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD&lt;/strong&gt;&amp;nbsp;to map the different signals (RXD, CTS...), to physical pins.&lt;/p&gt;
&lt;p&gt;I, however, do understand how to use the .overlay file to map the&amp;nbsp;&lt;span&gt;different signals (RXD, CTS...), to physical pins as you explained in your previous reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271727?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 10:38:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12d1b32d-8713-4c94-a71f-6a7cc248fa87</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello again!&lt;br /&gt;&lt;br /&gt;Good to hear!&lt;br /&gt;&lt;br /&gt;These registers are configured through Zephyr&amp;#39;s Devicetree overlays. I suggest that your read chapter &lt;strong&gt;1.4 The Device Tree&lt;/strong&gt; from &lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-1478313418#h8sjwm52udufgrtwj106y8lkrgs7n2"&gt;part 2&lt;/a&gt;&amp;nbsp;of our &lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/ncs_5f00_tutorial_5f00_1_5f00_2_5f00_0"&gt;nRF Connect SDK tutorial&lt;/a&gt;, where these concepts are well explained!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271705?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 08:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6c92deb-b403-43d7-b581-a3836f1fcf06</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Thank you Carl.&lt;/p&gt;
&lt;p&gt;It is now clear to me how to go about it.&lt;/p&gt;
&lt;p&gt;So, what is meant by the following description I read in the user manual OPS_v0.6.1, section 7.38.8?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7.38.8 Pin configuration&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;The different signals&lt;/strong&gt; RXD, CTS (Clear To Send, active low), RTS (Request To Send, active low), and TXD&lt;br /&gt;associated with the UARTE &lt;strong&gt;are mapped to physical pins according to the configuration specified in the&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;PSEL.RXD, PSEL.CTS, PSEL.RTS, and PSEL.TXD registers respectively.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thank you again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Map UARTE to physical pins?</title><link>https://devzone.nordicsemi.com/thread/271689?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 08:12:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b77060cf-6ff7-4c8d-ab73-11cf8df4cb3a</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello!&lt;br /&gt;&lt;br /&gt;When mapping physical pins in Zephyr you can use overlay files. For example, if you want to map the UARTE of the application processor of the nRF5340 on the PDK do the following:&lt;br /&gt;- Make a file in your project directory called: &lt;strong&gt;nrf5340pdk_nrf5340_cpuapp.overlay&lt;/strong&gt;&lt;br /&gt;- Fill it with the following code:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	tx-pin = &amp;lt; 0x14 &amp;gt;;
	rx-pin = &amp;lt; 0x16 &amp;gt;;
	rts-pin = &amp;lt; 0x13 &amp;gt;;
	cts-pin = &amp;lt; 0x15 &amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;You can see how it&amp;#39;s done for the nRF52840 DK &lt;a href="https://docs.zephyrproject.org/latest/boards/arm/nrf52840dk_nrf52840/doc/index.html#using-uart1"&gt;here&lt;/a&gt;&amp;nbsp;and you can read more about the Devicetree overlays &lt;a href="https://docs.zephyrproject.org/latest/guides/dts/howtos.html#set-devicetree-overlays"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>