<?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>Reset not happening after disconnection.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36762/reset-not-happening-after-disconnection</link><description>Hi Nordic, 
 In my application, I am trying to perform a Long_Button_Press reset. My button press has 2 modes -short press and long press. 
 I am able to reset the device, while the device is connected and streaming, or in beacon mode. However, once I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Aug 2018 10:46:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36762/reset-not-happening-after-disconnection" /><item><title>RE: Reset not happening after disconnection.</title><link>https://devzone.nordicsemi.com/thread/142355?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 10:46:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:717e5c36-180e-4774-9b1d-96025ff20c71</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;May I ask why you are using sdk 11 on an nrf52832 chip? It could be a good idea to use sdk 15 instead if possible. Have you taken a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/16258/about-button-long-press-and-short-press-detect"&gt;this devzone case&lt;/a&gt;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It should be possible to easily do this via the app_timer, as Ole Bauck explains: &amp;quot;If you intend to distinguish between short press and long press you should use app_timer. For example start a timer with a certain timeout when the button is pushed and stop it when the button is released. If the timer has timed out it is a short push, if it has timed out it is a long push.&amp;quot;&lt;/p&gt;
&lt;p&gt;He also writes: &amp;quot;The only example that shows long press and short press is the bsp module in the latest SDK. For example see bsp_button_event_handler(..) in bsp.c in SDK12. This uses more or less the same technique as I described in my answer (app_timer_start/app_timer_stop).&amp;quot;&lt;/p&gt;
&lt;p&gt;The same is the case in the bsp_button_event_handler in bsp.c in sdk 15. I would take a look at&amp;nbsp;the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/bsp_example.html?cp=4_0_0_4_5_4"&gt;bsp exampl&lt;/a&gt;e from sdk 15 &amp;amp; look at the bsp_button_event_handler there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset not happening after disconnection.</title><link>https://devzone.nordicsemi.com/thread/142038?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 04:25:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a56b4244-14d5-447e-b6fb-e654a868bb29</guid><dc:creator>arjun</dc:creator><description>&lt;p&gt;Hi Bjorn,&lt;/p&gt;
&lt;p&gt;I am using SDK11. Sorry, I meant &amp;#39;short button press&amp;#39;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried the NUS example code. I modified the button initialization and button handler function for detecting long /short press. I debugged by checking the status of variable assigned to both the cases. What I observed was that, after connection, my variable for long button press is not changing.The following code is attached above.&lt;/p&gt;
&lt;p&gt;Can you suggest some ideas for further debugging.&lt;/p&gt;
&lt;p&gt;Thanks :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset not happening after disconnection.</title><link>https://devzone.nordicsemi.com/thread/141936?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 13:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d11c1c4-cc27-4008-9605-2b4656003bb8</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Which SDK version are you currently using? Could you please explain what you mean by &amp;quot;instead it considers my long button press&amp;quot;? Have you tried debugging the example &amp;amp; adding more logging information to see what is happening?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>