<?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 write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/500/how-to-write-gpiote-interrupt</link><description>Hi, 
 i need to stop one of my Timer at the falling edge of a Pin. So i need a gpiote_interrupt, is this right? Can someone help me how i can do this? if i write something like GPIOTE_IRQHandler ( ) it doesn&amp;#39;t work. 
 best regards Nils</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Dec 2014 03:17:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/500/how-to-write-gpiote-interrupt" /><item><title>RE: How to write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/thread/2624?ContentTypeID=1</link><pubDate>Tue, 02 Dec 2014 03:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:503dc9a8-2634-4455-a6b8-e3e4cc6e0847</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;Hi Nils,
I have tried another example to test the gpio interrupt as the following link, it worked as expected on button_1.
&lt;a href="https://devzone.nordicsemi.com/question/4528/is-it-possible-to-create-a-gpio-button-interrupt-without-gpiote/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/thread/2623?ContentTypeID=1</link><pubDate>Tue, 02 Dec 2014 02:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a883480f-e4f4-44b7-978a-eebb12789507</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;Hi Nils,
I used the example code &amp;quot;pin_change_int_example&amp;quot; at SDK v6.1.0(softdevice v7.1.0) for gpio interrupt testing, it didn&amp;#39;t work at all. I have tried the example what you mentioned, it didn&amp;#39;t work too.
Can you have any advices for me?
Best regards.
Stanley&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/thread/2626?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 07:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c0ffc57-3cdf-4718-bf3b-8d04abbcff44</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;So in some parts of my code i use NVIC_EnableIRQ and not the soc methods, could this crash my device? And if i change this what you told me in the existing parts of my code like the PWM_MODUL it doesn&amp;#39;t work anymore. No i have to check out how this works, can you give me some more help for this?&lt;/p&gt;
&lt;p&gt;best regards Nils&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/thread/2625?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 06:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95b7ac91-98d6-4769-b75d-1881ede1fd2b</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Hi,
thank you for your answer, very helpful :).&lt;/p&gt;
&lt;p&gt;If i use the Softdevice and doesn&amp;#39;t use sd_nvic_EnableIRQ instead of NVIC_EnableIRQ what coudl happen?
the sd methods are all in the SOC.h is there a docu of this?&lt;/p&gt;
&lt;p&gt;How shoudl i do it with ppi?&lt;/p&gt;
&lt;p&gt;best regards Nils :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write GPIOTE interrupt?</title><link>https://devzone.nordicsemi.com/thread/2622?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 06:37:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fbdf442-351a-4a80-ae29-6fc774a87a65</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Nils&lt;/p&gt;
&lt;p&gt;The following steps are required to use interrupts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Tell the peripheral which events should generate interrupts, something like this:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_IN0_Msk;&lt;/code&gt;&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Enable the peripheral in the NVIC (if you use the SoftDevice use the sd_nvic_EnableIRQ() instead):&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;NVIC_EnableIRQ(GPIOTE_IRQn);&lt;/code&gt;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Implement the interrupt handler, and remember to check/clear the event:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;void GPIOTE_IRQHandler(void)
{
    if(NRF_GPIOTE-&amp;gt;EVENTS_IN[0] != 0)
    {
        NRF_GPIOTE-&amp;gt;EVENTS_IN[0] = 0;
        
        // Add your code here
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On a side note, have you considered using the PPI to stop the timer automatically on the GPIOTE event?
Then you might not need the interrupt at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>