<?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>Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20874/maximum-time-an-event-handler-may-block-the-application</link><description>Hi, 
 We&amp;#39;re working with very specific hardware which requires us to watch very closely. We&amp;#39;re currently considering a blocking function in an ble event handler which can take up to 166 ms to return a value. 
 What&amp;#39;s the maximum time a function call</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Mar 2017 14:32:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20874/maximum-time-an-event-handler-may-block-the-application" /><item><title>RE: Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/thread/81499?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 14:32:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d71db1ee-cb7a-4054-8ccc-5d64f2675bdd</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;That&amp;#39;s good to know. Yeah, I&amp;#39;m following the tutorial now. edit: irrelevant. And yes, it&amp;#39;s milliseconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/thread/81498?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 14:09:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90141b1b-1ad5-4b7a-a5ff-d86590704600</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;What did you mean by 275 and 280 ? Were they 275ms and 280ms ? Note that Even if you have lower connection interval, it&amp;#39;s possible to have long timeslot period (longer than connection interval) as the softdevice would skip some connection event to give the timeslot priority (not if that would cause connection timeout).
Have a look at the timeslot tutorial  &lt;a href="https://devzone.nordicsemi.com/tutorials/16/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/thread/81501?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 09:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c73a550-96ab-4ea8-84de-cab734da9417</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Yes, with such long connection interval it should be stable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/thread/81500?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 09:29:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49416479-a38d-4c6b-a06c-f26fa9cb458a</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;Alright, thanks! I was just looking in that document. If I understand correctly I should use &lt;code&gt;sd_radio_request()&lt;/code&gt; to obtain a time slot. Which initially has a maximum of 100 ms but can be extended up to 128 s (depending on the other activities). We&amp;#39;re currently using an connection interval in between 275 and 280. So that means we should be able to obtain a time slot of 170 ms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum time an event handler may block the application</title><link>https://devzone.nordicsemi.com/thread/81497?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 09:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ddf3ad9-6fb5-48f6-be1d-fbdf8b91855e</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It&amp;#39;s kind of evident that blocking the MCU for 170ms isn&amp;#39;t good idea, especially if you are running any BLE activity with lower interval (connection or advertising). There is time-slot API mechanism in later S110 as well as all newer SD flavors, &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/concurrent_multiprotocol_tsl_api/tsl_usage_examples.html?cp=2_3_0_0_8_2"&gt;see this explanation for S132&lt;/a&gt; (there is similar section in S110 Soft Device Specification v2.0 document but that is released just as PDF). If you decide to use it and encounter any problem there are plenty Q&amp;amp;A on this forum about time-slot API usage and problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>