<?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>Is ble_hrs_heart_rate_measurement_send  safe to call in interrupt?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5010/is-ble_hrs_heart_rate_measurement_send-safe-to-call-in-interrupt</link><description>developer.nordicsemi.com/.../a00969.html 
 I&amp;#39;m trying to understand whether this can be called in a timer interrupt ( app_timer ) and how frequently. I seem to have a bug where after the first 60 or so samples, not every sample is being sent up to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jan 2015 06:09:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5010/is-ble_hrs_heart_rate_measurement_send-safe-to-call-in-interrupt" /><item><title>RE: Is ble_hrs_heart_rate_measurement_send  safe to call in interrupt?</title><link>https://devzone.nordicsemi.com/thread/17666?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2015 06:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b770df62-b42e-43c8-9652-828d90cedb47</guid><dc:creator>la-ble</dc:creator><description>&lt;p&gt;That was exactly the issue.  This doesn&amp;#39;t answer the question originally posted, which is whether it&amp;#39;s safe to send a message from an interrupt.  Does the send function just copy data to a buffer and set a flag or does blocking transmission happen there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is ble_hrs_heart_rate_measurement_send  safe to call in interrupt?</title><link>https://devzone.nordicsemi.com/thread/17665?ContentTypeID=1</link><pubDate>Wed, 07 Jan 2015 12:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ed87f8e-1c28-49a6-a069-5a8a67edc117</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What I am suspecting is that the connection interval is changed. When you connect with the iphone and start to receive data from the device, connection interval is decided by IOS, which is typically ~30ms. When 5 seconds have passed, ble_app_hrs will send connecion_parameter_update_request to the central (the phone) which will change the connection interval to 500-1000 ms. Try to change the connection interval requested by the device and see what happens then.&lt;/p&gt;
&lt;p&gt;More info on connection parameters &lt;a href="https://devzone.nordicsemi.com/question/60/what-is-connection-parameters/"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/12545/update-connection-parameter-programmatically/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, you could use e.g. Lightblue app to see monitor the data received on IOS&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 9.1.2014&lt;/strong&gt;
When a sd_* softdevice function is called (e.g. &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.1.0/s110/html/a01060.html#ga00ea603adee7561e8bdc00c8853a0ba8"&gt;sd_ble_gatts_hvx&lt;/a&gt;), then the data is stored in a softdevice buffer and there it is stored until it is sent over the air on a following BLE connection event, so the call is non-blocking.   More on data transmission is &lt;a href="https://devzone.nordicsemi.com/question/17926/how-should-i-increase-the-throughput-of-my-ble-application/?answer=17954#post-id-17954"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>