<?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>When app timer handling its ISR，can ble observer interrupt it？</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61936/when-app-timer-handling-its-isr-can-ble-observer-interrupt-it</link><description>When app timer handling its ISR，can ble observer interrupt it？</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jun 2020 15:06:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61936/when-app-timer-handling-its-isr-can-ble-observer-interrupt-it" /><item><title>RE: When app timer handling its ISR，can ble observer interrupt it？</title><link>https://devzone.nordicsemi.com/thread/252585?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 15:06:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd5e4fb-2d38-410d-a8a8-974ef72b7a21</guid><dc:creator>bingehuang</dc:creator><description>&lt;p&gt;You are right! I set&amp;nbsp;&lt;span&gt;APP_TIMER_CONFIG_IRQ_PRIORITY&amp;nbsp;&lt;/span&gt;&lt;span&gt;to 7，and a BLE observer&amp;nbsp; can&amp;nbsp;preempt&amp;nbsp;the app timer IRQ. Thank you so much！^_^&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When app timer handling its ISR，can ble observer interrupt it？</title><link>https://devzone.nordicsemi.com/thread/252382?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 11:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d817bd9-499e-4003-a059-37de56d926f6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;All observers are notified in the same SD_EVT_IRQn interrupt context regardless of observer priority. So the &lt;span&gt;APP_TIMER_CONFIG_IRQ_PRIORITY &lt;/span&gt;would have to be &amp;quot;lowered&amp;quot; to priority 7 to allow it to be preempted by a BLE observer.&lt;/p&gt;
&lt;p&gt;The observer priority determines in which order the various observers are notified. Eg a BLE callback with priority 1 will always get called before a BLE callback with priority 2. Please refer to &amp;quot;&lt;span&gt;&lt;a title="Observers and their priorities" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_softdevice_handler.html?cp=7_1_3_47_2_0#lib_sdh_register_observer"&gt;Observers and their priorities&lt;/a&gt;&lt;/span&gt;&amp;quot; for more details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When app timer handling its ISR，can ble observer interrupt it？</title><link>https://devzone.nordicsemi.com/thread/252293?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 03:02:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f30a312-36bd-42b0-b87d-4d84268a8e3e</guid><dc:creator>bingehuang</dc:creator><description>&lt;p&gt;Thanks for answer!&lt;/p&gt;
&lt;p&gt;Now&amp;nbsp;I set&amp;nbsp;&lt;span&gt;APP_TIMER_CONFIG_IRQ_PRIORITY to 6 ,&amp;nbsp;and set a ble service observer&amp;nbsp;&amp;nbsp;priority to 2 , the&amp;nbsp;ble observer&amp;nbsp;still can not preempt the timer IRQ handler.&amp;nbsp; A ble write&amp;nbsp;occurs when app timer handling its IRQ，but the&amp;nbsp;ble observer does not report&amp;nbsp;BLE_GATTS_EVT_WRITE&amp;nbsp;until the app timer IRQ done.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Am i missing something？Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When app timer handling its ISR，can ble observer interrupt it？</title><link>https://devzone.nordicsemi.com/thread/252279?ContentTypeID=1</link><pubDate>Thu, 28 May 2020 18:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:690227f2-e7a9-46c9-b9c2-c16ca4ededc8</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Depends on the app timer priority: APP_TIMER_CONFIG_IRQ_PRIORITY&lt;/p&gt;
&lt;p&gt;With the default prio (6), the ble observer can preempt the timer IRQ handler.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: As mentioned below, I was mistaken about the SD event IRQ priority, which happens to be 6, too. Thus by default the timer evens &lt;strong&gt;cannot&lt;/strong&gt; be preempted unless APP_TIMER_CONFIG_IRQ_PRIORITY is configured to be 7.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>