<?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>GAP disconnect stops app timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12066/gap-disconnect-stops-app-timer</link><description>I&amp;#39;m running a BLE application on the nRF51822. And I have an application timer to keep track of the real time clock. However, when I receive a BLE_GAP_EVT_DISCONNECTED event, I notice the &amp;quot;m_conn_params_timer_id&amp;quot; timer gets stopped. But this timer ID</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Feb 2016 14:37:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12066/gap-disconnect-stops-app-timer" /><item><title>RE: GAP disconnect stops app timer</title><link>https://devzone.nordicsemi.com/thread/45671?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 14:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90dbdee5-3792-4c7d-9eef-66d1ccf31d65</guid><dc:creator>Bryan V</dc:creator><description>&lt;p&gt;I found the real root of the problem. I was never initializing the connection parameters (ble_conn_params_init), and on disconnect my dispatch handler function was, however, calling ble_conn_params_on_ble_evt() which stops the one shot timer that ble_conn_params_init() should have created.&lt;/p&gt;
&lt;p&gt;Since the m_conn_params_timer_id is initialized to zero, app_timer_stop() stops the timer ID with ID = 0, which is ID of the real time clock.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GAP disconnect stops app timer</title><link>https://devzone.nordicsemi.com/thread/45670?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 14:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e4048fd-c7b1-4d97-b37b-e8308792d5c3</guid><dc:creator>Bryan V</dc:creator><description>&lt;p&gt;I gathered that much, but from what I&amp;#39;m reading the timer ID is populated by the app timer APIs and it is not a variable I am in control of setting. I am currently following the steps outlined in the tutorial; I am using SDK 9 so maybe I will try with SDK 10 to see if it gets resolved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GAP disconnect stops app timer</title><link>https://devzone.nordicsemi.com/thread/45669?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 07:36:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14bb7f71-d036-4d1f-9999-78bd4ad9eff9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;As RK says, you cannot use the same ID for two timers. You may find it worh reading the &lt;a href="https://devzone.nordicsemi.com/tutorials/19/"&gt;Application Timer Tutorial&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GAP disconnect stops app timer</title><link>https://devzone.nordicsemi.com/thread/45668?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 01:27:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d81598a4-bb8b-4ec0-8a0f-e4646dbe52c3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Neither of the above.&lt;/p&gt;
&lt;p&gt;Your problem is that two timers have the same ID, which is clearly wrong, hence one or both of them were initialised incorrectly. So you need to fix that, as that is your actual issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>