<?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>Cleanup at timeslot end</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58356/cleanup-at-timeslot-end</link><description>Hi 
 if one searches the examples using the timeslot API, every application seems to do it&amp;#39;s own timeslot cleanup. Also documentation is not very clear about this. 
 Best/most confusing is nrf_raal_softdevice.c which does an exit with explicitly raising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Mar 2020 22:03:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58356/cleanup-at-timeslot-end" /><item><title>RE: Cleanup at timeslot end</title><link>https://devzone.nordicsemi.com/thread/238951?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 22:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c31a279f-ef4d-463e-97df-6d7f236de032</guid><dc:creator>rgrr2</dc:creator><description>&lt;p&gt;Actual answer can be found here: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58373/timeslots-and-softdevice-assertion-failed-pcxxx-0x2552e"&gt;devzone.nordicsemi.com/.../timeslots-and-softdevice-assertion-failed-pcxxx-0x2552e&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cleanup at timeslot end</title><link>https://devzone.nordicsemi.com/thread/237108?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 11:59:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:257484e6-9352-43d3-8f16-6e53563459fe</guid><dc:creator>rgrr2</dc:creator><description>&lt;p&gt;Hi Hung Bui&lt;/p&gt;
&lt;p&gt;don&amp;#39;t want to waste *your* time, but I&amp;#39;m already discussing an occuring failed assertion inside the softdevice in another thread with a colleague of you, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58373/timeslots-and-softdevice-assertion-failed-pcxxx-0x2552e"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/58373/timeslots-and-softdevice-assertion-failed-pcxxx-0x2552e&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My original idea of incorrect cleanup at end of timeslot seems to lead in the right direction: it has (hopefully) something to do with changed interrupt priorities of the radio.&lt;/p&gt;
&lt;p&gt;Thanks for your support again.&lt;/p&gt;
&lt;p&gt;Hardy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cleanup at timeslot end</title><link>https://devzone.nordicsemi.com/thread/236999?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 21:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d38ffc11-7014-4a04-9a03-a78bd71aa634</guid><dc:creator>rgrr2</dc:creator><description>&lt;p&gt;Hi Hung Bui&lt;/p&gt;
&lt;p&gt;thanks for the suggestion and examples.&amp;nbsp; I will have a closer look at those by tomorrow.&lt;/p&gt;
&lt;p&gt;To me the thing which stings most in the eye is, that in the example the slot requests are done either as a result of the callback via NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END or in the event handler thru sd_radio_requests().&amp;nbsp; Same method can be found e.g. in nrf_raal_softdevice.c&lt;/p&gt;
&lt;p&gt;I think the above guarantees some synchronicity between BLE and the timeslot requester.&lt;/p&gt;
&lt;p&gt;In our application the time of the next slot is not known / calculated at the end of the running slot.&amp;nbsp; So we have to use sd_radio_request() from user space after calculating the schedule.&lt;/p&gt;
&lt;p&gt;Is this approach &amp;quot;legal&amp;quot; as well?&amp;nbsp; Or do we have to synchronize somehow BLE and our protocol to avoid race conditions inside the timeslot API?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m asking, because I&amp;#39;m experiencing random crashes inside the softdevice during concurrent operation.&amp;nbsp; One thing to check is/was how to leave timeslots in a tidy way.&lt;/p&gt;
&lt;p&gt;So the question: do you have any hints, how the sd_radio_requests() should be done in a proper way?&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; regards&lt;/p&gt;
&lt;p&gt;Hardy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cleanup at timeslot end</title><link>https://devzone.nordicsemi.com/thread/236969?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 17:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b36773ea-7459-4086-b0e2-58bb9fffda8d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hardy,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to test timeslot, I would suggest you to have a look here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/running-micro-esb-concurrently-with-ble"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/running-micro-esb-concurrently-with-ble&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s pretty old but the principle is the same. When you receive&amp;nbsp;NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0 you have to stop the TIMER, RADIO etc.&amp;nbsp;&lt;br /&gt;It&amp;#39;s showed in the code above where&amp;nbsp;&lt;span&gt;TIMESLOT_END_IRQHandler() is called.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also attached here an example on SDK v15.0 . The radio is not used but you can find the TIMER being stopped in&amp;nbsp;NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0 event in timeslot.c (the example is in&amp;nbsp;\examples\ble_peripheral\ble_app_uart)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-71d07cbacc4e4f299058dd2180cf6305/nRF5_5F00_SDK_5F00_15.0.0_5F00_Timeslot.zip"&gt;devzone.nordicsemi.com/.../nRF5_5F00_SDK_5F00_15.0.0_5F00_Timeslot.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>