<?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>GPIO Pin as INPUT in NRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61490/gpio-pin-as-input-in-nrf5340</link><description>Hello , 
 I am playing with PDK NRF 5340, I am trying to write a simple code to configure a PIN (0.10) which is not already in use by PDK. 
 When I print it&amp;#39;s state it always says &amp;quot;LOW&amp;quot;. here is my code. 
 
 
 what my serial output says is - 
 
 and that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 May 2020 08:43:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61490/gpio-pin-as-input-in-nrf5340" /><item><title>RE: GPIO Pin as INPUT in NRF5340</title><link>https://devzone.nordicsemi.com/thread/251408?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 08:43:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3b82ec5-3d78-4699-a886-38e27bae3521</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you test the&amp;nbsp;249716_hello_world/build/zephyr/zephyr.hex in the&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f526fd18fcd24a749942191997488a66/249716_5F00_hello_5F00_world.zip"&gt;devzone.nordicsemi.com/.../249716_5F00_hello_5F00_world.zip&lt;/a&gt; with the following command?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfjprog -f NRF53 --eraseall
nrfjprog -f NRF53 --program zephyr.hex
nrfjprog --pinreset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you have a wire connect the&amp;nbsp;&lt;span&gt;Pin 0.10 and GND, you will see Low. Connecting the Pin 0.10 and the VDD on PDK, you will see HIGH.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amana H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Pin as INPUT in NRF5340</title><link>https://devzone.nordicsemi.com/thread/251049?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 15:01:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff058461-7311-4503-8dc2-fc0f76e2e810</guid><dc:creator>Uncle_Jack</dc:creator><description>&lt;p&gt;Hi, Amanda.&lt;/p&gt;
&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/61490/gpio-pin-as-input-in-nrf5340/250669"]modify &amp;quot;if(old != &lt;strong&gt;st1&lt;/strong&gt;)&amp;quot; to &amp;quot;if(old != &lt;strong&gt;status&lt;/strong&gt;)&amp;quot;[/quote]
&lt;p&gt;&lt;span&gt;I changed name of variable from &amp;quot;st1&amp;quot; to &amp;quot;status&amp;quot; for the readability of the code.&lt;/span&gt;&amp;nbsp;But at the above place it was left &amp;quot;st1&amp;quot; by mistake, updated in OP. sorry my bad. So that&amp;#39;s not issue I am sure.&lt;/p&gt;
[quote userid="77782" url="~/f/nordic-q-a/61490/gpio-pin-as-input-in-nrf5340/250669"]remove &amp;quot;CONFIG_TRUSTED_EXECUTION_NONSECURE=y&amp;quot;[/quote]
&lt;p&gt;I tried removing above line but result is still same.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Pin as INPUT in NRF5340</title><link>https://devzone.nordicsemi.com/thread/250669?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 10:51:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b594907d-5c53-4aac-aeb8-a2b772503026</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you modify &amp;quot;if(old != &lt;strong&gt;st1&lt;/strong&gt;)&amp;quot; to &amp;quot;if(old != &lt;strong&gt;status&lt;/strong&gt;)&amp;quot; and remove &amp;quot;CONFIG_TRUSTED_EXECUTION_NONSECURE=y&amp;quot; in the&amp;nbsp;&lt;span&gt;prj.conf, it should work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amandn H.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO Pin as INPUT in NRF5340</title><link>https://devzone.nordicsemi.com/thread/250468?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 13:49:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0d8c81e-a5ba-420c-a5d7-da3acf8ee260</guid><dc:creator>Uncle_Jack</dc:creator><description>&lt;p&gt;And yes here is my prj.conf file content -&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_0_NRF_UARTE=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>