<?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>Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58728/using-timeslot-api-and-fds</link><description>Hi all, 
 I am working on a project that requires simultaneous usage of BLE and ESB. I implemented that with the timeslot API and it basically works. However, I need to store some data to flash using fds when a certain packet is received using ESB. I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Mar 2020 13:49:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58728/using-timeslot-api-and-fds" /><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/239140?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:49:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4751b3d5-81b3-426e-b2e3-9962efa6013d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/239119?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 13:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fb9525a-6738-41aa-9d87-11e9d59696ab</guid><dc:creator>Bert Thomas</dc:creator><description>&lt;p&gt;Yes, this solved it! It&amp;#39;s working now as expected. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/238749?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 09:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f0b8923-1ab8-4323-b955-bb47601f77ab</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Bert,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It the Timer 0 Interrupt handler has a higher priority than 4, then calling the sd_- API will result in a HardFault, see&amp;nbsp;&lt;a title="Interrupt priority levels" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=4_5_2_0_15_1"&gt;Interrupt priority levels&lt;/a&gt;.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;The priorities of the interrupts reserved by the SoftDevice cannot be changed. 
This includes the SVC interrupt. Handlers running at a priority level higher
than 4 (lower numerical priority value) have neither access to SoftDevice functions 
nor to application specific SVCs or RTOS functions running at lower priority levels
(higher numerical priority values).&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So if the Timer0 handler has a higher priority than 4 you need to schedule the&amp;nbsp;&lt;span&gt;sd_radio_session_close() call to be called from a lower priority or&amp;nbsp; from main&amp;#39;s context.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/238714?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 07:55:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd48f61-d940-48e1-8247-478daf1e0ff4</guid><dc:creator>Bert Thomas</dc:creator><description>&lt;p&gt;When I execute sd_radio_session_close() the softdevice code runs into the hardfault handler. Are you sure I can execute sd_radio_session_close() from the timer0 handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/238353?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 15:26:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffaf0723-a6f5-4f7b-ac1b-a6fc029f3efc</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ah, sorry Bert you are correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should use the&amp;nbsp;&lt;span&gt;NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0&amp;nbsp;event, which should be generated about 100uS or so before the timeslot ends. So you either call&amp;nbsp;sd_radio_session_close() here and then use the&amp;nbsp;NRF_EVT_RADIO_SESSION_CLOSED&amp;nbsp;event to trigger the Flash operations&amp;nbsp; or you can start an application timer here to timeout after about 100us and use its timeout handler to initiate the flash operations.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It should be fine to call sd_radio_session_close while the timeslot is open, see &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/setting-up-the-timeslot-api"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/setting-up-the-timeslot-api&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/238317?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 13:36:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7486f06-e259-4194-85be-83580d2c16f6</guid><dc:creator>Bert Thomas</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;At startup I invoke&amp;nbsp;sd_radio_session_open(). Each time the timeslot has elapsed the timer0 handler returns&amp;nbsp;NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END to schedule the next timeslot. At what moment am I supposed to receive RADIO_SESSION_CLOSED event? Shouldn&amp;#39;t I invoke sd_radio_session_close() to accomplish this? But I assume that to be able to execute sd_radio_session_close() the timeslot must have ended, right?&amp;nbsp; So I&amp;#39;m confused...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using timeslot API and fds</title><link>https://devzone.nordicsemi.com/thread/238284?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 12:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faed5aa9-483b-43b5-bdd2-2baeceb9e9aa</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Bart,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;it should be safe&amp;nbsp;to call the sd_-API after you have received the&amp;nbsp;NRF_EVT_RADIO_SESSION_CLOSED event, which indicates that the timeslot has been closed and the SoftDevice is in control of the peripherals it uses.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>