<?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>External GPIO Interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101306/external-gpio-interrupt</link><description>I was developing my own driver for my hobby project literally from the scratch just by reading the nrf52832 datasheet. Recently I was adding gpio interrupts to the driver code, configured nRF52 DK button pin as an interrupt. Below is my Interrupt handler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Jun 2023 17:44:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101306/external-gpio-interrupt" /><item><title>RE: External GPIO Interrupt</title><link>https://devzone.nordicsemi.com/thread/433531?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 17:44:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91d068bb-48dd-4b40-8214-ab3ea7c5adcd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You are likely experiencing input &amp;#39;&lt;a href="https://en.wikipedia.org/wiki/Switch#Contact_bounce"&gt;bouncing&lt;/a&gt;&amp;#39;. To address this issue, one common approach is to disable the interrupt for a few milliseconds following the initial input event to give the input signal time to settle.&lt;/p&gt;
[quote user="Akhil Francis"]Also could you please explain me, why the dummy line added in NRF_SDK for the interrupt clearing for ARM cortex M4?&amp;nbsp;[/quote]
&lt;p&gt;Please refer to the &amp;#39;the &amp;#39;Interrupt event clearing&amp;#39; section in the&amp;nbsp;&lt;a title="Migrating from the nRF51 Series to the nRF52 Series" href="https://infocenter.nordicsemi.com/topic/migration_nrf52/MIG/nrf52_migration/preface.html?cp=5_8"&gt;Migrating from the nRF51 Series to the nRF52 Series&lt;/a&gt;&amp;nbsp;guide. The dummy read may be needed when you have a very short execution time in the ISR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External GPIO Interrupt</title><link>https://devzone.nordicsemi.com/thread/433504?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 14:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4736baa4-2324-4efa-ab8f-ed178a58da30</guid><dc:creator>Akhil Francis</dc:creator><description>&lt;p&gt;Yes I did tried with&amp;nbsp;&lt;span&gt;ECTO_GPIOTE-&amp;gt;EVENTS_IN[0] = 0;&amp;nbsp;&lt;/span&gt;but still its making more than one for some time. But it wont happen if I am putting break point inside the handler function&amp;nbsp; for each button press and executing again. It will only happen with continues execution. Is there any connection from time for the signal transition from low to high.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also could you please explain me, why the dummy line added in NRF_SDK for the interrupt clearing for ARM cortex M4?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External GPIO Interrupt</title><link>https://devzone.nordicsemi.com/thread/433430?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 10:57:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02080d63-b10b-40ff-9752-0c535164b329</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you tried to just clear the event like this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ECTO_GPIOTE-&amp;gt;EVENTS_IN[0] = 0;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can also use the register definitions from the MDK for the same.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;e.g.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_GPIOTE-&amp;gt;EVENTS_IN[0] = 0;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>