<?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>Change pinmux at runtime?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77308/change-pinmux-at-runtime</link><description>Hi 
 
 I am developing a Zephyr application on a nRF52840. 
 Is it possible to runtime change pinmux. Eg. I have set rx/tx for an uart to p1.8, p1.9 and want them to be changed to p1.10, p1.11 at a later stage? (Is new to Zephyr and nRF) 
 
 I have been</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Jul 2021 06:10:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77308/change-pinmux-at-runtime" /><item><title>RE: Change pinmux at runtime?</title><link>https://devzone.nordicsemi.com/thread/319512?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 06:10:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a41ffdad-9f93-4b4d-a000-24bc59595f5b</guid><dc:creator>Morten Sabinsky</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks it seems to work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/Morten&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change pinmux at runtime?</title><link>https://devzone.nordicsemi.com/thread/319384?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 12:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd4688dc-4694-41ba-9637-74d98cf7bc1a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Morten,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, its not possible to change this run-time using the zephyr serial driver, but you can do this manually by writing to the NRF_UARTEx registers. This is how you shut down the peripheral:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68599/zephyr-nrf52840-device-crashes-when-turning-off-uart-with-device_set_power_state-uart-device_pm_off_state-null-null/281533#281533"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/68599/zephyr-nrf52840-device-crashes-when-turning-off-uart-with-device_set_power_state-uart-device_pm_off_state-null-null/281533#281533&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Enabling it (do note that .ENABLE is 8 for UART mode! &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/uarte.html?cp=2_0_0_5_18_8_39#register.ENABLE"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf9160/uarte.html?cp=2_0_0_5_18_8_39#register.ENABLE&lt;/a&gt;) is basically starting the tasks that you stopped.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>