<?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>Reconfigure GPIO pins during runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75926/reconfigure-gpio-pins-during-runtime</link><description>Hi all, 
 I have the following issue: For an electrochemical measurement I need to use 4 GPIO pins bundled in pairs, each pair with an output (GPIO HI) and ground (GPIO LO). Sadly I cannot just configure the 4 as LO and then activate the one I need, since</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jun 2021 18:46:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75926/reconfigure-gpio-pins-during-runtime" /><item><title>RE: Reconfigure GPIO pins during runtime</title><link>https://devzone.nordicsemi.com/thread/315714?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 18:46:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:859d1c76-c466-47ec-9a49-bc209cc1b490</guid><dc:creator>Fran89</dc:creator><description>&lt;p&gt;Thank you very much for your answer. Although it doesn&amp;#39;t really address the question I posed, it can be helpful for someone else. I will verify is as correct and close the topic. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconfigure GPIO pins during runtime</title><link>https://devzone.nordicsemi.com/thread/313192?ContentTypeID=1</link><pubDate>Wed, 02 Jun 2021 16:15:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:771d2040-bf48-405b-883b-d95141f19c86</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;One of the advantages of using a multiple-register set/reset/port scheme is that up to 32-bits of an i/o port can simultaneously be written in any combination with a single instruction. &lt;em&gt;gpio_pin_toggle()&lt;/em&gt; and other similar port functions hide this advantage by using a single pin number as a parameter, like older simpler cpus; however you can instead use something like &lt;em&gt;nrf_gpio_port_out_write()&lt;/em&gt; which takes any combination of the 32 pins including changing 2 pins from low to high and vice versa with a single instruction by using a 32-bit mask. Underneath this instruction is &lt;em&gt;P0.OUTCLR = mask&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Search for the definition in &lt;em&gt;nrf_gpio.c&lt;/em&gt; and write&amp;nbsp; new function&amp;nbsp;&lt;em&gt;gpio_port_toggle()&lt;/em&gt; which takes a mask as a parameter, or simply use the low-level instruction directly.&lt;/p&gt;
&lt;p&gt;Off topic - I concur&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>