<?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 support</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112194/zephyr-debounce-support</link><description>I am developing a firmware for nRF52810. 
 Does Zephyr support debounce care for push button switches in ncs v2.6.1? 
 
 It seems that CAF supports it, but I don&amp;#39;t plan to use CAF. 
 According to the following document, debounce related properties can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Sep 2025 21:26:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112194/zephyr-debounce-support" /><item><title>RE: Zephyr debounce support</title><link>https://devzone.nordicsemi.com/thread/547976?ContentTypeID=1</link><pubDate>Fri, 05 Sep 2025 21:26:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0be47727-65cc-43e0-a096-ec12eb3b8c57</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Yaxit,&lt;/p&gt;
&lt;p&gt;You are right. My apology. I misunderstood the&amp;nbsp;source files back then. Indeed, the default GPIO driver, enabled with just CONFIG_GPIO, doesn&amp;#39;t provide the gpio-keys input driver functionality. We would need to enable&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/kconfig/index.html#CONFIG_INPUT_GPIO_KEYS"&gt;CONFIG_INPUT_GPIO_KEYS&lt;/a&gt;&amp;nbsp;and use the driver like in the link you gave. Thank you for the correction.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr debounce support</title><link>https://devzone.nordicsemi.com/thread/547527?ContentTypeID=1</link><pubDate>Tue, 02 Sep 2025 15:06:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd7b20a5-48b6-44fc-bc1b-9b5806ed6572</guid><dc:creator>Yaxit</dc:creator><description>&lt;p&gt;This answer seems misleading, and I think it&amp;#39;s creating confusion. As far as I know, the GPIO driver does not provide debouncing. Debouncing is provided by the gpio-keys input driver, which has a completely different API.&lt;br /&gt;An example here:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/drivers/input/gpio_keys/src/main.c"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr debounce support</title><link>https://devzone.nordicsemi.com/thread/489281?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 11:55:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3657b737-998b-43bc-a3c7-0a9e0b82e1b6</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hiroshi,&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;It seems that the default Zephyr GPIO driver has some software debouncing integrated.&lt;/span&gt;&lt;br /&gt;Update 08 Sep 2025: The information above is incorrect. The default Zephyr GPIO driver, which is enabled with CONFIG_GPIO, doesn&amp;#39;t&amp;nbsp;use the gpio-keys debounce property. Refer to the later replies to this.&lt;/p&gt;
&lt;p&gt;The feature is requested here:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/52344"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/52344&lt;/a&gt;&lt;br /&gt;and added here:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/52698"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/52698&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is also documented here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/zephyr/build/dts/api/bindings/input/gpio-keys.html#dtbinding-gpio-keys"&gt;gpio-keys (nordicsemi.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please give it a try and see if it works for you.&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t match your requirement, then there is an article from Golioth on how to setup your own debouncing on the Zephyr project site:&amp;nbsp;&lt;a href="https://zephyrproject.org/how-to-debounce-button-inputs-in-a-rtos/"&gt;How to Debounce Button Inputs in Real Time Operating Systems – Zephyr Project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>