<?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>Event handler interaction</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9519/event-handler-interaction</link><description>Is there a document describing the interaction and any asynchronous issues with the different types of event handlers? As I read it there are softdevice events, BLE events, timer events and button events. Are the handlers for all of these and any I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Oct 2015 06:03:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9519/event-handler-interaction" /><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35163?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2015 06:03:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96f258c2-473c-4edc-91f7-bbc8349d823b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Is there anything else on this thread? if not can you please accept the answer. It is important to accept the answer that helped you as others find this thread as green when they are searching for something like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35162?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2015 22:40:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc1b68-45b6-444a-a2fb-921031d10a22</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;OK, thanks.  That makes the process, sequence and the implications on event critical sections much clearer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35164?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2015 11:01:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4728011e-d4c3-4f2c-95df-7fc1360ae685</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The softdevice interrupt your event_handler to process and queue more events, but after that it will pend the SWI2 interrupt again.&lt;/p&gt;
&lt;p&gt;There are two scenarios here&lt;/p&gt;
&lt;p&gt;1)No_scheduler is used for events handling
In this case your application event_handler is running at SWI2 interrupt context, the new pend of SWI2 interrupt by the new event inside the softdevice will not interrupt your event_handler until its finished.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;scheduler is used for running softdevice_handler module in different interrupt context
Then the app_scheduler internal event buffer will make sure that the events are pulled out in serial way.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One NOTE though,
By serial here I mean that the the previous handler is not interrupted by new event until its gets finished.&lt;/p&gt;
&lt;p&gt;By serial I do not say that the sequence of events occurance and the events_handler call is same. Because this cannot be guarenteed
as the sd_evt_get searches for events inside the softdevice from the start again.
So if event1 handler is executing and while it is executing three more events happen inside softdevice (event3, event 10 and event1)
Then after the event_handler for event1 is finished then sd_evt_get will return event1 instead of event3 as it searches for events from the start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35161?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2015 20:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca0170d4-a96a-475a-a3ab-c4dab0fca2f3</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;Since soft device events are sent to the application handler as SWI interrupts.  Does this mean that all soft device events sent the the handler in the application are serial in how they are processed?  Thus there will not be multiple call backs to the event handler, until the previous callback has completed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35160?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2015 07:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:904d6260-1a2e-4b8f-84ee-368df2935bac</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.sds/S110_SDS_v2.0.pdf"&gt;S110 SoftDevice Specifications V2.0&lt;/a&gt; Chapter 11.4 and Chapter 12 tells you how SWI interrupts interact with softdevice activity&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35159?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 19:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c9658d-f6cd-4278-995f-d36408d7d091</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;Thanks Aryan.  More explanation would be helpful.  Also, pointers to which section of the specification covers these SWI interactions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35158?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 17:15:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c6af298-3686-4c2c-8e10-e323af4bd829</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Events are also  SWI interrupts which are routed to application by softdevice handler module. In  specification, they have given some explanation of how these interrupts inh each other. Do you mean that is not clear enough?
If you already read the specs for softdevice then I will explain better tomorrow as I am not so good in typing on my phone :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35157?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 15:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db71390-19ef-41a8-844d-cbbc991087fc</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;As a side note, radio notifications are not events like the others.  They are interrupts.  And as I&amp;#39;ve discovered you can miss a radio notification if two come close together.  It gets sent as one interrupt to the application.  This problem occurs with heavy flash writes going on at the same time there is BLE activity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35156?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 15:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8bd42a3-9cf3-4cf5-895a-9ab1db22c53a</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;I&amp;#39;m still not clear how each of these interact with the other.  Are they scheduled independently or synchronously to each other?  Can on type of event interrupt another?  This helps define what items I need to wrap in critical sections.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event handler interaction</title><link>https://devzone.nordicsemi.com/thread/35155?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2015 08:51:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6830f068-bcdf-4e8d-9a8d-f715c7ea86b6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;With nordic chips if you are using BLE stack application can get&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Interrupts from configured peripherals (Timers, watchdog, RTC, buttons uses GPIO interrupts)&lt;/li&gt;
&lt;li&gt;BLE events&lt;/li&gt;
&lt;li&gt;system events like flash operations (pstorage if your application uses it)&lt;/li&gt;
&lt;li&gt;radio notification events (if your application enables it)&lt;/li&gt;
&lt;li&gt;Timeslot events (if your application enables it)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>