<?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>How to detect gpio interrupt for 10 seconds.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/894/how-to-detect-gpio-interrupt-for-10-seconds</link><description>Hi, 
 We are using nrf51822 custom board. 
 i want to hard reboot of my device whenever gpio button is pressed for longer than 10 seconds. 
 i am using ble_app_hrs application. 
 For that i started 10 second timer whenever in button_event_handler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Nov 2013 08:37:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/894/how-to-detect-gpio-interrupt-for-10-seconds" /><item><title>RE: How to detect gpio interrupt for 10 seconds.</title><link>https://devzone.nordicsemi.com/thread/4367?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 08:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c7f2270-39cd-41d0-9d7f-fc62a8d444a3</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Ok, cool. Have a nice day&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to detect gpio interrupt for 10 seconds.</title><link>https://devzone.nordicsemi.com/thread/4366?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 07:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fcd693d-cbf6-436e-a62b-db6dec7a2a14</guid><dc:creator>balaji</dc:creator><description>&lt;p&gt;Hi Sebastien,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;But you press button once again it will again start timer for 10 second.&lt;/p&gt;
&lt;p&gt;so it will not hard do reset.&lt;/p&gt;
&lt;p&gt;Regards
Balaji&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to detect gpio interrupt for 10 seconds.</title><link>https://devzone.nordicsemi.com/thread/4365?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2013 21:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cca7767b-503b-40b1-a312-82eb2fdba915</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using NVIC_SystemReset to reset the chip and it is working.&lt;/p&gt;
&lt;p&gt;By the way, you should implement a gpiote event on your button pin to catch if the user release the button before the end of the timer.&lt;/p&gt;
&lt;p&gt;Because in your case, the following scenario is working  :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Press button 1 second&lt;/li&gt;
&lt;li&gt;Release the button and wait 8 seconds&lt;/li&gt;
&lt;li&gt;Press button 1 second --&amp;gt; BAM! hard reset&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>