<?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>UART pins change in a runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118245/uart-pins-change-in-a-runtime</link><description>Hello, 
 I have to handle two devices with one UART. Previously, I made it by suspending UART, changing its state between PINCTRL_STATE_DEFAULT and PINCTRL_STATE_SLEEP and resuming it after change. It worked on NCS version 2.6.1 but it doesn&amp;#39;t work after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2025 14:02:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118245/uart-pins-change-in-a-runtime" /><item><title>RE: UART pins change in a runtime</title><link>https://devzone.nordicsemi.com/thread/519795?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 14:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cd76143-bb03-4541-9ac3-d9b6b7c69888</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;In the MCUmgr communication you are referring to, is MCUboot running, or is the application running?&lt;/p&gt;
&lt;p&gt;MCUboot runs its own DeviceTree and you can still use UART normally with it.&lt;/p&gt;
&lt;p&gt;As for the application, if you still define the node on DeviceTree and&amp;nbsp;enable the Zephyr driver, then you will be able to use it.&amp;nbsp;You&amp;nbsp;&lt;em&gt;can&lt;/em&gt; use nrfx alongside to change the pin as you want.&amp;nbsp;&lt;em&gt;However&lt;/em&gt;, you need to understand the Zephyr UART driver implementation and how other subsystem, like MCUmgr, uses the Zephyr UART driver to be able to switch safely.&lt;/p&gt;
&lt;p&gt;At this point, the most proper solution would be to write your own&amp;nbsp;UART driver for Zephyr that allow this functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pins change in a runtime</title><link>https://devzone.nordicsemi.com/thread/519523?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2025 12:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c85824f9-13ec-4cef-ade6-aed1bbb147d7</guid><dc:creator>tdfilip</dc:creator><description>&lt;p&gt;What I want to do with that uart1 is to communicate&amp;nbsp;using mcumgr with mcuboots of two nRFs. If I use nrfx driver, will I be able to assign uart1 to mcumgr in devicetree?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pins change in a runtime</title><link>https://devzone.nordicsemi.com/thread/519508?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2025 11:30:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a1ccf1-9340-4a38-a6e6-2ada4eb16ccd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Not sure which version you were using, but yes&amp;nbsp;&lt;span&gt;CONFIG_UART_1_GPIO_MANAGEMENT&amp;nbsp; seems to have been removed as a configurable option from the SDK some time ago (not sure which SDK version that was removed)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ability to dynamically change pins on the fly is not officially supported by Zephyr or our drivers. Trying to do additional workarounds like this through the Zephyr API is very tricky with changing API behavior. It looks like due to the fact that&amp;nbsp;CONFIG_UART_1_GPIO_MANAGEMENT&amp;nbsp; is not available anymore, it is not clear if you can even attempt to change the pins on the fly using Zephyr API. I would have tried to use only nrfx driver for uart1 you have a resource restriction and you need to reconfigure pin on the fly, something that have been discussed &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/104410/uart-pins-remapping-at-run-time/448992"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>