<?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>Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93918/disable-uart1-of-nrf52840-dk-and-re-configure-pins-as-gpios-at-runtime</link><description>Hi, 
 we are currently using NCS 2.0.2 on nRF52840 . 
 Is it possible to disable uart1 via pinctrl or another library during runtime and re-configure the rx/tx as gpios? 
 We need to set the two pins in low-state to allow another module enter its sleep</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Nov 2022 09:47:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93918/disable-uart1-of-nrf52840-dk-and-re-configure-pins-as-gpios-at-runtime" /><item><title>RE: Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime</title><link>https://devzone.nordicsemi.com/thread/396157?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 09:47:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4d86dbc-1bd7-4950-950b-86308f181879</guid><dc:creator>siwa</dc:creator><description>&lt;p&gt;Thanks, that works!&lt;/p&gt;
&lt;p&gt;Even in the busy wait loop, the UART pins can be set low or high after the suspend command is called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime</title><link>https://devzone.nordicsemi.com/thread/396135?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 08:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89c9634a-2e5e-4bff-97ab-a4aac24e2304</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;br /&gt;Which sleep mode are you looking at ?&amp;nbsp;&lt;br /&gt;If you are thinking of system&amp;nbsp;OFF I do think that it&amp;#39;s possible.&amp;nbsp;You can suspend UART and then use the&amp;nbsp;nrf_gpio_* library to access the pins and change the state. (see system_off sample) . The main point here is that if you are entering system OFF , it&amp;#39;s not very important how they would work after the system OFF entered. The chip will reset and start from beginning when waking up anyway.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime</title><link>https://devzone.nordicsemi.com/thread/396050?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 15:29:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fff327a-5bda-46c9-a7c0-97b8e9c8668f</guid><dc:creator>siwa</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your quick reply.&lt;/p&gt;
&lt;p&gt;Then I have a further question. Is it possible to set them (tx/rx) low during sleep mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime</title><link>https://devzone.nordicsemi.com/thread/395971?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 12:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d665ca7e-8de0-45ae-be19-f4d24b1e795e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;br /&gt;Your question is similar to this question &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/93551/can-the-uart-rx-tx-pins-be-also-read-as-gpio-input-pins"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Our answer for now is that it&amp;#39;s not possible. You can have a look here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#dynamic-pin-control"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#dynamic-pin-control&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dynamic pin control should only be used on devices that have not been initialized. Changing pin configurations while a device is operating may lead to unexpected behavior. Since Zephyr does not support device de-initialization yet, this functionality should only be used during early boot stages.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>