<?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>Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91298/use-the-same-pin-to-wake-up-and-other-uses</link><description>Hi to all! 
 I&amp;#39;m trying to use the same GPIO to wake up the nrf52810 from system off and also use it to execute some functions. I have this code that is based on the example from this link: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/zephyr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Sep 2022 08:49:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91298/use-the-same-pin-to-wake-up-and-other-uses" /><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/384735?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 08:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:643bfff0-2b3c-41a7-9e10-2a3dca790e17</guid><dc:creator>clake</dc:creator><description>&lt;p&gt;Thanks for the reply&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/384709?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 07:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be50ddb6-717b-4c50-b784-bab33847332b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No, we do not have a specific sample that shows debouncing.&lt;/p&gt;
&lt;p&gt;The gpio driver in zephyr does not have support for debouncing, but the DK buttons and LEDs library has:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/others/dk_buttons_and_leds.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/libraries/others/dk_buttons_and_leds.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/384524?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 09:31:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a33d0fc-665b-4f89-b71c-b06e2eb1d434</guid><dc:creator>clake</dc:creator><description>&lt;p&gt;thanks for the reply!&lt;/p&gt;
&lt;p&gt;And sorry for my late response. Can you please attach an example of how can I configure it using zephyr?&lt;/p&gt;
&lt;p&gt;Best regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/383453?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 11:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:579bc92c-e2bc-4e35-a1c2-4c5f5f6be4d9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="clake"]after configure as a sense then, when the nrf52 wake up from system off, the GPIO (I&amp;#39;m using the same as interrupt and for wake up) sense 2 time when I push the button.[/quote]
&lt;p&gt;Systemoff means no clocks are running, only combinatory logic is available, such as a pin change or reset signal.&lt;/p&gt;
&lt;p&gt;The wakeup condition is level triggered, meaning when that pin goes active; the&amp;nbsp;nRF will reset and start up.&lt;/p&gt;
&lt;p&gt;When waking up, if you get 2 interrupts on that pin, it actually means that you have gotten 3 events.&lt;/p&gt;
&lt;p&gt;1 to initially wake up (where as the nRF starts from a reset state), and two afterwards.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you need to do in order to avoid registering several events&amp;nbsp;after boot-up is to handle this by debouncing the signal in software.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/383383?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2022 06:07:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ed2b23-9218-42c5-bdf0-928fa14f479a</guid><dc:creator>clake</dc:creator><description>&lt;p&gt;Hi H&amp;aacute;kon,&lt;/p&gt;
&lt;p&gt;Is a software problem, I&amp;#39;m using the nrf52 DK with the board buttons. The problem is: If I configure one GPIO to use it as interrupt, then only with that I can&amp;#39;t wake up the nrf from system_off. So, to be able to wake it up I have to configure the GPIO as sense to wake it up, but after configure as a sense then, when the nrf52 wake up from system off, the GPIO (I&amp;#39;m using the same as interrupt and for wake up) sense 2 time when I push the button. One quick fix that I&amp;#39;ve made was clean the configuration of the port when it wake up.&lt;/p&gt;
&lt;p&gt;Is a more effective way to configure the same GPIO as an interrupt and to use it a sense to wake up?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use the same pin to wake up and other uses</title><link>https://devzone.nordicsemi.com/thread/383285?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2022 12:44:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ee44e41-73c9-44e0-b4a9-1f7d211d0658</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]This is executed when long press the button. Then in the wake up, it works but the button has some strange behavior like it us pulsed 2 times at the same time.[/quote]
&lt;p&gt;Do you apply an external pull resistor on the pin? How is your debouncing implemented?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>