<?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>Unable to read gpios</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128195/unable-to-read-gpios</link><description>Hi, I am unable to read GPIOs (always getting 0x00000000 from gpio_port_get or 0 from gpio_pin_get). My main project is https://github.com/marcuswu/leaf-fall/tree/main/firmware/keyboard, but I made a smaller test project to try to figure out the gpio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jun 2026 16:20:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128195/unable-to-read-gpios" /><item><title>RE: Unable to read gpios</title><link>https://devzone.nordicsemi.com/thread/567295?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2026 16:20:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fbd5d44-10c3-45b6-9239-a36d3eed6570</guid><dc:creator>mwu</dc:creator><description>&lt;p&gt;I ended up getting my smaller test project working and from there I simplified my main firmware project until the gpio reads worked. That narrowed me down to the problem which was my initialization of the RTC.&lt;/p&gt;
&lt;p&gt;I ended up switching from using NRFX&amp;#39;s RTC driver to using Zephyr&amp;#39;s Counter driver. That resolved my issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to read gpios</title><link>https://devzone.nordicsemi.com/thread/567235?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2026 23:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a1cf5cc-da37-4426-b771-eb7d35b98766</guid><dc:creator>mwu</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20260601_2D00_175456.png" alt=" " /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20260601_2D00_175446.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I managed to set up an oscilloscope and connect it to my board. Here is what I&amp;#39;m seeing. The first screenshot is a button not pressed. The second is a button pressed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Should I not see a steady high signal on a pin configured for pull up, active low and then a steady low signal when the button is pressed?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;They both have about the same frequency with a period of about 18ms.&lt;/p&gt;
&lt;p&gt;Any ideas what would cause this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to read gpios</title><link>https://devzone.nordicsemi.com/thread/566789?ContentTypeID=1</link><pubDate>Fri, 22 May 2026 14:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:587e5a7c-3b0f-4223-80ad-079a656fc536</guid><dc:creator>mwu</dc:creator><description>&lt;p&gt;If I switch to gpio_port_get_raw(), the equivalent of my input mask is returned. When I use a multimeter I see ~3.3v (as expected since I&amp;#39;m using pull up, sense low).&lt;br /&gt;&lt;br /&gt;edited for grammar (removed extra word)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to read gpios</title><link>https://devzone.nordicsemi.com/thread/566786?ContentTypeID=1</link><pubDate>Fri, 22 May 2026 13:49:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:749a2b28-1066-4c98-aa69-62c039f0996c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Do you see the same with&amp;nbsp;&lt;span&gt;gpio_port_get_raw()?&lt;br /&gt;&lt;br /&gt;Have you&amp;nbsp;tried measuring the GPIOs externally with a&amp;nbsp;multimeter? are they actually 0V?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to read gpios</title><link>https://devzone.nordicsemi.com/thread/566683?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 12:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:943bf965-2fd8-427a-8e64-ce9b97a45785</guid><dc:creator>mwu</dc:creator><description>&lt;p&gt;There is also a board definition in the leaf-fall firmware directory for the Raytac module that I created and tried using which doesn&amp;#39;t define as many unused things on the device tree as the nrf52dk does. It has the same issues when using either DTS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>