<?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 switch uart pins while runtime using pinctrl (Zephyr) (nrf52832) ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90660/how-to-switch-uart-pins-while-runtime-using-pinctrl-zephyr-nrf52832</link><description>To whom it may concern, 
 I have a project (using Zephyr) where I need to switch UART pins while runtime. Is there a way I can handle this? This is how I initialize pinctrl pins. 
 
 I split it into two different groups. Is it possible to initialize these</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Aug 2022 09:06:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90660/how-to-switch-uart-pins-while-runtime-using-pinctrl-zephyr-nrf52832" /><item><title>RE: How to switch uart pins while runtime using pinctrl (Zephyr) (nrf52832) ?</title><link>https://devzone.nordicsemi.com/thread/380964?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 09:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dd42803-49b7-444a-a8cf-e8878b46146b</guid><dc:creator>charlestrevino</dc:creator><description>&lt;p&gt;It&amp;#39;s okay about the late reply, I had the same problem so luckily got the answer here. &lt;span style="color:#ffffff;"&gt;&lt;a style="color:#ffffff;" href="https://2player.co"&gt;2 player games&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch uart pins while runtime using pinctrl (Zephyr) (nrf52832) ?</title><link>https://devzone.nordicsemi.com/thread/380946?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 08:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:570042d0-6faf-48bf-af3a-0802a3096650</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the delayed response. Yes, switching between the groups at runtime or dynamic pin allocation, should be possible. You can refer to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#pinctrl-guide"&gt;Pin Control&lt;/a&gt; for further details regarding this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, in the screenshot that you attached, since you are using &lt;strong&gt;pinctril1&amp;nbsp;&lt;/strong&gt;, and initialising the i2c0 and uart0 within this, it would be better to stick to pinctl1 when defining it within the uart0&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1660118511470v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As I mentioned earlier, please refer the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#pinctrl-guide"&gt;Pin Control&lt;/a&gt; section for further details.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>