<?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>Timeslot api - timeslots triggered prematurely</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44006/timeslot-api---timeslots-triggered-prematurely</link><description>Hi, 
 
 Disclaimer - this is definitely a question where one picture worth a 1000 words... ;) 
 
 My app use timeslot api to get a free time period to do some hard real-time job (nRF52832, SDK15.2) 
 The needed timeslot duration is ~1000us and the interval</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Feb 2019 23:22:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44006/timeslot-api---timeslots-triggered-prematurely" /><item><title>RE: Timeslot api - timeslots triggered prematurely</title><link>https://devzone.nordicsemi.com/thread/173130?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 23:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f00e634d-af20-4cf9-a5f1-6f9721fde044</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;To whom it may help -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It happened to be a flaw in my code.&lt;/p&gt;
&lt;p&gt;I called an RTOS api, xQueueSendFromISR(),&amp;nbsp; from within the callback.&lt;/p&gt;
&lt;p&gt;The callback runs in the highest priority (smallest number - 0)&amp;nbsp;which is higher than&amp;nbsp;configMAX_SYSCALL_INTERRUPT_PRIORITY&amp;nbsp;(=2) as described &lt;a href="https://www.freertos.org/a00110.html#kernel_priority"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeslot api - timeslots triggered prematurely</title><link>https://devzone.nordicsemi.com/thread/172725?ContentTypeID=1</link><pubDate>Mon, 25 Feb 2019 11:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91e346fe-28b2-4685-90f7-6d160c489927</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi eyalasko,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;Now, I occasionally observe&amp;nbsp;that the next timeslot, that is supposed to get triggered every 29000us (or longer in 100us steps) actually fires prematurely.&lt;/p&gt;
&lt;p&gt;This is often accompanied by a hard-fault (not necessarily immediately)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;We have not seen such a behavior with timeslots before. Are you sure that the clock source LFCLK is selected correctly with the right accuracy? If there are differences in the underlying clock accuracies and to which you which configured the softdevice, this could happen as the softdevice measured expected jitter varies to the actual actual clock. This can be fixed by telling the softdevice the right accuracy of the lfclk being used when you enable the softdevice.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]If initial&amp;nbsp;timeslot was granted using high priority, do all other timeslots should be requested with high priory as well?[/quote]
&lt;p&gt;No, that should not be needed. You can take each timeslot request on the individual basis.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is it possible that after the&amp;nbsp; callback returned&amp;nbsp;NRF_RADIO_SIGNAL_CALLBACK_ACTION_END, another single timeslot shall be triggered (as also observed)[/quote]
&lt;p&gt;&amp;nbsp;That should not happen if you have only opened one session. There seems to be something wrong in the request of the timeslot. Are you sure that your app is not trying to request another timeslot while there is one already in the queue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>