<?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>Button Press detected twice when pushed once</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90122/button-press-detected-twice-when-pushed-once</link><description>Hi, 
 
 I&amp;#39;m using a custom board to record i2s data to a sd card. The recording starts and stops on a button press (Pin 25), which basically works. My problem is that the button press is always detected twice (once on pushing the button, once on release</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Jul 2022 13:06:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90122/button-press-detected-twice-when-pushed-once" /><item><title>RE: Button Press detected twice when pushed once</title><link>https://devzone.nordicsemi.com/thread/379144?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 13:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:012f8264-a96b-4fbe-9346-e359232121d9</guid><dc:creator>Moritz_S</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;thanks for your answer. I just wanted to let you know that we are still looking into this. I will get back to you after my holidays.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Moritz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button Press detected twice when pushed once</title><link>https://devzone.nordicsemi.com/thread/377833?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 11:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ca33d94-9a3f-431b-b310-c1628a248ba2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The app_timer library does indeed use the configured LF clock/crystal by default. In our example projects the default configuration is to use the optional external 32.768 kHz crystal. If you don&amp;#39;t have this crystal on your custom board you will have to use the internal RC oscillator instead. In your timer_init() function it seems like you are using the external LF crystal though.&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: Button Press detected twice when pushed once</title><link>https://devzone.nordicsemi.com/thread/377623?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 12:29:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b71c66e3-1621-4fc5-a749-81357029305f</guid><dc:creator>Moritz_S</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m including the &amp;quot;app_button.h&amp;quot; header, I initialize the clock (see init_clock above) and the buttons (see buttons_init above) as it is shown in the ble_blinky example. If this is done correctly, I don&amp;#39;t see why the timer should not work (app_timer.h is also included an initialized in timers_init()).&lt;/p&gt;
&lt;p&gt;We are using a custom board. I will verify with my hardware expert, if the button is installed correctly.&amp;nbsp;Does the app_timer library rely on an external crystal or is everything built into the SOC (we are using nrf52832).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button Press detected twice when pushed once</title><link>https://devzone.nordicsemi.com/thread/377613?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 12:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60021a93-17c3-42ec-85e8-d3494d127c58</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It sounds like you&amp;#39;re not having a debounce implemented in your application. The button handler lib uses the GPIOTE handler to detect a button that has been pushed, and should start a timer in the GPIOTE event handler to handle this.&amp;nbsp;&lt;span&gt;The button will only be reported as pushed if the corresponding pin is still active when the timer expires. If there is a new GPIOTE event while the timer is running, the timer is restarted.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the hardware side of things, as long as there is a pull-up on the pin (internal or external) and there is a physical switch or button that connect the input to ground when pressed, then it can be used as a button. Are you using a Development Kit or a custom board for your application?&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></channel></rss>