<?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>Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75495/zephyr-debounce-gpio-input-with-interrupt</link><description>I work with Zephyr v1.5.1. PDK NRF5340. I implemented interrupt from PB1 and sometimes I get double interrupt. 1. Is input Debouncing supported in Zephyr? 
 2. How can I implement/change debouncing interval? 
 I tried to configurate the pin from &amp;quot;gpio_pin_configure</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Jul 2021 14:18:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75495/zephyr-debounce-gpio-input-with-interrupt" /><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/318671?ContentTypeID=1</link><pubDate>Mon, 05 Jul 2021 14:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a67dcf6-0000-4eb7-a220-ff9f72515300</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It is possible to pass in the flag&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/7c0e0b97d5bae1c3c51c540c8d14aca33437785f/include/drivers/gpio.h#L209"&gt;&lt;span&gt;GPIO_INT_DEBOUNCE&lt;/span&gt;&lt;/a&gt;&amp;nbsp;to &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/7c0e0b97d5bae1c3c51c540c8d14aca33437785f/include/drivers/gpio.h#L706"&gt;gpio_pin_configure()&lt;/a&gt;. However, it does not seem like the gpio_nrfx.c driver supports it unfortunately. Check out the&amp;nbsp;application nrf_desktop to see&amp;nbsp;one example of how to&amp;nbsp;implement debouncing:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/11fb11eb1cbda80e9a83806e5f5499f8ce6a2cc6/subsys/caf/modules/buttons.c#L414"&gt;https://github.com/nrfconnect/sdk-nrf/blob/11fb11eb1cbda80e9a83806e5f5499f8ce6a2cc6/subsys/caf/modules/buttons.c#L414&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.5.1/applications/nrf_desktop/src/hw_interface/buttons.c#L30"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/318318?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 00:50:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:820f8e47-1bc2-4557-b089-958d9e56df2c</guid><dc:creator>sshenoy105</dc:creator><description>&lt;p&gt;FYI: I am currently using the latest greatest NRF5340 DK and NCS 1.5.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/318317?ContentTypeID=1</link><pubDate>Fri, 02 Jul 2021 00:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba624386-8aad-44d6-b7ec-6ea251262723</guid><dc:creator>sshenoy105</dc:creator><description>&lt;p&gt;I have used that sample and i see two interrupts per press at least once every few presses.. when will NCS support GPIO INT denouncing ? asking so that I can decide to wait or quickly cook&amp;nbsp; one on my own.. thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/311592?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 18:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:350da4c4-d584-40b5-a49e-69c55fe6c03c</guid><dc:creator>Simon</dc:creator><description>[quote user="vadymsodolevsky"]Additional question. Can you point me where can I find the NRFX (GPIO) drivers description for 5340?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There are not any nrfx_gpio.c driver in &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/tree/v1.5.1/nrfx/drivers/src"&gt;&amp;lt;ncs location&amp;gt;/modules/hal/nordic/nrfx/src&lt;/a&gt;. As you can see in the GPIO &amp;quot;translation&amp;quot; layer &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.4.99-ncs2/drivers/gpio/gpio_nrfx.c"&gt;&amp;lt;ncs location&amp;gt;/zephyr/drivers/gpio/gpio_nrfx.c&lt;/a&gt; it will include these:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;drivers/gpio.h&amp;gt;
#include &amp;lt;hal/nrf_gpio.h&amp;gt;
#include &amp;lt;hal/nrf_gpiote.h&amp;gt;
#include &amp;lt;nrfx_gpiote.h&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since the GPIO is closely coupled with the GPIOTE peripheral, most of the logic is in nrfx_gpiote.c. The GPIOTE peripheral makes it possible to generate interrupts on button events.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/311589?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 17:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14597b9f-c786-425c-8f6b-c0dfae957434</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you test the button sample&amp;nbsp;zephyr\samples\basic\button\src? It&amp;nbsp;wiil generate an interrupt when button 1 is pressed and blink an LED.&lt;/p&gt;
&lt;p&gt;If you&amp;nbsp;get several interrupts triggered from one button press with that sample, please tell me and I will look into it.&lt;/p&gt;
&lt;p&gt;By the way, I would recommend you to get an nRF340 DK, since the PDK is not recommended for production:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74463/nrf5340-pdk-to-ncs-1-5-x-compatibility/307212#307212"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/74463/nrf5340-pdk-to-ncs-1-5-x-compatibility/307212#307212&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Debounce GPIO Input with interrupt.</title><link>https://devzone.nordicsemi.com/thread/311219?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 08:52:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4637fd2c-a179-49c2-9248-4366eb0e538f</guid><dc:creator>VadymS</dc:creator><description>&lt;p&gt;Additional question. Can you point me where can I find the NRFX (GPIO) drivers description for 5340?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>