<?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>Best nRF9160 Zephyr way to configure high impedance pin state?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86752/best-nrf9160-zephyr-way-to-configure-high-impedance-pin-state</link><description>Hello Devzone Community, 
 I have a question set regarding correct, best way or ways to configure nRF9160 GPIOs for high impedance. My hardware is a custom board but shares a feature set similar to Nordic nRF9160DK 1.0.0 and Sparkfun Thing Plus nRF9160</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Apr 2022 14:57:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86752/best-nrf9160-zephyr-way-to-configure-high-impedance-pin-state" /><item><title>RE: Best nRF9160 Zephyr way to configure high impedance pin state?</title><link>https://devzone.nordicsemi.com/thread/362640?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 14:57:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a2e0d87-2cc7-42cb-be74-d48ed61048be</guid><dc:creator>tedhavelka</dc:creator><description>&lt;p&gt;Hello &amp;Oslash;yvind,&lt;/p&gt;
&lt;p&gt;With my question I meant to ask whether in Zephyr 2.6.0 GPIO framework, need I a different pin configuration for pins which in normal, active powered mode are inputs, versus other pins which are outputs.&amp;nbsp; I am sorry for the poorly worded question!&lt;/p&gt;
&lt;p&gt;I will re-run a couple tests using GPIO_DISCONNECTED.&amp;nbsp; I recently discovered that symbol in Zephyr documentation, but when I apply it to just a few pins (which were not explicitly configured yet) I see current increase, not decrease.&amp;nbsp; If the pin configuration GPIO_DISCONNECTED is physically disconnecting the I/O pins of the nRF9160, I would expect overall board current to remain the same or decrease.&amp;nbsp; My observations however are counter-intuitive.&lt;/p&gt;
&lt;p&gt;There are a couple of tests I will set up and observe.&amp;nbsp; But it sounds like for both &amp;quot;active time&amp;quot; input and output lines to the nRF9160, the highest impedance setting is GPIO_DISCONNECTED, correct?&lt;/p&gt;
&lt;p&gt;One more question:&amp;nbsp; is it a valid design choice to call Zephyr RTOS gpio configuration API periodically during firmware run time?&amp;nbsp; In other words, when electrically safe does the nRF9160 support Zephyr or other code changing GPIO configuration dynamically?&lt;/p&gt;
&lt;p&gt;- Ted&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best nRF9160 Zephyr way to configure high impedance pin state?</title><link>https://devzone.nordicsemi.com/thread/362608?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 12:50:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86c434bd-67f8-4497-95b9-9f38f123a1d5</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello Ted,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not quite sure what you are asking for. Do you need pin configuration for three different scenarios?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]It has this form, but I find that _FLAGS by default gets assigned a value of zero:[/quote]
&lt;p&gt;Yes, this seems correct base don the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/devicetree/api.html#c.DT_GPIO_FLAGS"&gt;response of the &lt;span&gt;DT_GPIO_FLAGS&amp;nbsp;&lt;/span&gt;API&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In regards to setting the pin to high-impedance, the following call should be used:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;gpio_pin_configure(led.port, led.pin, GPIO_DISCONNECTED);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best nRF9160 Zephyr way to configure high impedance pin state?</title><link>https://devzone.nordicsemi.com/thread/362450?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 19:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7a5b960-728e-4591-b4cd-2e6c581dc73a</guid><dc:creator>tedhavelka</dc:creator><description>&lt;p&gt;For some reason the Zephyr documentation link I entered in my initial post is incorrect, broken.&amp;nbsp; The correct link is:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/2.6.0/reference/peripherals/gpio.html?highlight=gpio_disconnected#c.GPIO_DISCONNECTED" rel="noopener noreferrer" target="_blank"&gt;https://docs.zephyrproject.org/2.6.0/reference/peripherals/gpio.html?highlight=gpio_disconnected#c.GPIO_DISCONNECTED&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>