<?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 set high priority to push button</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13311/how-to-set-high-priority-to-push-button</link><description>I&amp;#39;m using nrf51822. I have a program which shut down the system when the button is clicked. however, not every time I click the button, the system respond. my system is full of other events (interrupts).
the BUTTON_DETECTION_DELAY is set to 1 second</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Jul 2018 14:41:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13311/how-to-set-high-priority-to-push-button" /><item><title>RE: how to set high priority to push button</title><link>https://devzone.nordicsemi.com/thread/139926?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 14:41:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b3123d5-d3c8-4f80-9892-f264e1271a01</guid><dc:creator>jyothi</dc:creator><description>&lt;p&gt;For this to work, you need to define Button_detection_delay right?&lt;/p&gt;
&lt;p&gt;Can I know the function which you&amp;nbsp; have written for defininng this detection of delay&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/263a.svg" title="Relaxed"&gt;&amp;#x263a;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to set high priority to push button</title><link>https://devzone.nordicsemi.com/thread/50747?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2016 12:10:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4635e70-e03e-48c4-8bd7-931a5573bc9a</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The button handler should have APP_IRQ_PRIORITY_HIGH priority by default. This is set in the app_gpiote_init function. app_button uses app_gpiote library.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/50606/nrf51822ek-on-kit-button-triggering/?answer=51757#post-id-51757"&gt;This link&lt;/a&gt; could also help with understanding the debouncing functionality further.&lt;/p&gt;
&lt;p&gt;It looks like you use pullup for your button, which means it is not floating, so that is not the reason for your problem.&lt;/p&gt;
&lt;p&gt;If it still does not work, you could try the example on &lt;a href="https://devzone.nordicsemi.com/question/35482/app_gpiote_user_disable-not-working/?answer=37111#post-id-37111"&gt;this thread&lt;/a&gt;, to see if it works better.&lt;/p&gt;
&lt;p&gt;If you are using softdevice and a lot of other interrupts, a possible explanation is that the button signal is toggled to fast and an interrupt is missed, see &lt;a href="https://devzone.nordicsemi.com/question/15696/nrf51822-sense-pin-in-port-mode-doesnt-solve-the-gpiote-overconsumption-in-event-mode/?comment=15962#comment-15962"&gt;this thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>