<?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>Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when &amp;quot;GPIO_INT_EDGE_BOTH&amp;quot; flag is used.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111521/handling-gpio-interrupts-using-zephyr-gpio-h-while-using-dk_buttons_and_leds-driver-make-unwanted-behavior-for-the-rising-edge-trigger-just-when-gpio_int_edge_both-flag-is-used</link><description>Hello, 
 While I was handling GPIO interrupts using Zephyr GPIO Driver in an sample that already uses the DK Buttons and LEDs driver, I get that the interrupt callback is called twice at the rising edge when the interrupt was configured using &amp;quot;GPIO_INT_EDGE_BOTH</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jun 2024 11:44:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111521/handling-gpio-interrupts-using-zephyr-gpio-h-while-using-dk_buttons_and_leds-driver-make-unwanted-behavior-for-the-rising-edge-trigger-just-when-gpio_int_edge_both-flag-is-used" /><item><title>RE: Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when "GPIO_INT_EDGE_BOTH" flag is used.</title><link>https://devzone.nordicsemi.com/thread/487107?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2024 11:44:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:064231b1-5c26-471e-a8b2-5afc959eeed3</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Basem,&lt;/p&gt;
&lt;p&gt;Based on what I noted previously, can you:&lt;/p&gt;
&lt;p&gt;1) test upto four buttons using only the DK Button library,&lt;/p&gt;
&lt;p&gt;2) test upto four button using only your own configuration and not the DK button library,&lt;/p&gt;
&lt;p&gt;3) if it is working correctly (step 1 and 2), then extend for more buttons&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when "GPIO_INT_EDGE_BOTH" flag is used.</title><link>https://devzone.nordicsemi.com/thread/486984?ContentTypeID=1</link><pubDate>Sat, 01 Jun 2024 20:39:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbe3360c-1d9d-4465-b7e3-0303034d4e70</guid><dc:creator>Basem Barakat</dc:creator><description>&lt;p&gt;OK but why the described issue happens, and how can I prevent it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when "GPIO_INT_EDGE_BOTH" flag is used.</title><link>https://devzone.nordicsemi.com/thread/486866?ContentTypeID=1</link><pubDate>Fri, 31 May 2024 10:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa7194b8-06c9-4048-b5af-4076b16d1376</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Yes, the DK Button and LED library is designed to work with up to 4 LEDS and 4 Buttons only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when "GPIO_INT_EDGE_BOTH" flag is used.</title><link>https://devzone.nordicsemi.com/thread/486642?ContentTypeID=1</link><pubDate>Thu, 30 May 2024 11:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d86b6a-434f-487d-a51b-c0345da9e708</guid><dc:creator>Basem Barakat</dc:creator><description>[quote userid="119245" url="~/f/nordic-q-a/111521/handling-gpio-interrupts-using-zephyr-gpio-h-while-using-dk_buttons_and_leds-driver-make-unwanted-behavior-for-the-rising-edge-trigger-just-when-gpio_int_edge_both-flag-is-used/486210"]Why are you using the DK button and LED library when you are configuring the pin yourself?[/quote]
&lt;p&gt;Hi Naeem,&lt;/p&gt;
&lt;p&gt;Thank you for your response, and actually I&amp;#39;m&amp;nbsp;using&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/matter/template/README.html"&gt;Matter: Template sample&lt;/a&gt;&amp;nbsp;to create my matter light bulb device, and this sample uses the&lt;span&gt;&amp;nbsp;DK button and LED library, where I used zephyr GPIO.h,&amp;nbsp;I just didn&amp;#39;t&amp;nbsp;modify what the sample uses.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The behavior I got is strange and I can&amp;#39;t understand its reason.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can&amp;#39;t use the&amp;nbsp;DK button and LED library because I think it can&amp;#39;t provide more than 4 LEDs and 4 buttons, and I need to control 10 buttons and around 10 LEDs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Basem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling GPIO interrupts using Zephyr gpio.h while using DK_Buttons_and_LEDs driver make unwanted behavior for the rising edge trigger just when "GPIO_INT_EDGE_BOTH" flag is used.</title><link>https://devzone.nordicsemi.com/thread/486210?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 13:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f688a3b1-6556-42b1-b795-bd342424b351</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Basem,&lt;/p&gt;
&lt;p&gt;Why are you using the DK button and LED library when you are configuring the pin yourself?&lt;/p&gt;
&lt;p&gt;you can achieve what you want to do by just configuring the pin as you are doing and not using the DK button lib, or just by using the DK button lib. Below I am just using the DK button library and removed pin interrupt config from the main. I can see clock cycles when the button is pressed and released:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716902784335v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(showing short, short and long button press).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>