<?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>Nrf51822 stops handling GPIOTE-&amp;gt;PORT interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26876/nrf51822-stops-handling-gpiote--port-interrupts</link><description>Hi engineers, Here we are facing a critical problem in which the NRF51822 stops handling/processing the GPIOTE-&amp;gt;PORT interrupts after some days good working. This problem is occurring randomly whereby our system will stop working completely. Then, we</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Nov 2017 10:22:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26876/nrf51822-stops-handling-gpiote--port-interrupts" /><item><title>RE: Nrf51822 stops handling GPIOTE-&gt;PORT interrupts</title><link>https://devzone.nordicsemi.com/thread/105650?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 10:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2e4fe3d-2b22-438c-a985-c9938236fc89</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@sansei: Please be aware that the DETECT signal is shared between all pins. Meaning if one pin is keeping the DETECT signal high, it will block the GPIOTE PORT even to trigger again by other pins.&lt;/p&gt;
&lt;p&gt;With your setup, I don&amp;#39;t see how you can handle the scenario where the button is pressed at the point that you are processing the SENSOR, it will keep the DETECT signal high, and blocks the GPIOTE PORT event to be triggered.  This mean the button press will never be handled and if the SENSOR is triggered again, it will too, won&amp;#39;t be processed by the CPU. The result is a deadlock and you will see that the device won&amp;#39;t respond to the button press to reset.&lt;/p&gt;
&lt;p&gt;So basically, a PORT even can only be triggered if all of the triggers (GPIO pin with SENSE enable) are inactive. You will have to either do a loop to wait and process all the pin before you clear the event NRF_GPIOTE-&amp;gt;EVENTS_PORT = 0; or you have to invert the SENSE polarity so that the holding pin won&amp;#39;t hold the DETECT signal any more.&lt;/p&gt;
&lt;p&gt;Another option is to use GPIOTE PIN event, so that they don&amp;#39;t share the same DETECT trigger, but current consumption of GPIOTE PIN is much higher than GPIOTE PORT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 stops handling GPIOTE-&gt;PORT interrupts</title><link>https://devzone.nordicsemi.com/thread/105649?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2017 23:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e0753b-05f4-4cd8-bac9-f6992a61f77f</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;You should say which SD if any you are using.&lt;/p&gt;
&lt;p&gt;Also, I&amp;#39;m not really crazy about those nrf_delay statements.  The delay routine literally holds the processor up running NOP&amp;#39;s until the delay is over. It is a huge waste of power (significant if battery operated) and also could cause issues with the queuing of ISR&amp;#39;s. If you are running the SD there are many tasks that require ISR&amp;#39;s and you could simply be overflowing the NVIC.
A better way to keep LED&amp;#39;s on. or do some other delay is to use the app_timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>