<?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>Calling soft-device methods from UART/UARTE interrupt handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14034/calling-soft-device-methods-from-uart-uarte-interrupt-handler</link><description>I have an application which receives commands from a co-processor via UART. Some commands are BLE-related such as, e.g. start-scan, stop-scan, connect, etc. 
 
 As the UART event handler is called in the context of the UART/UARTE interrupt, is it safe</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 May 2016 05:23:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14034/calling-soft-device-methods-from-uart-uarte-interrupt-handler" /><item><title>RE: Calling soft-device methods from UART/UARTE interrupt handler</title><link>https://devzone.nordicsemi.com/thread/53660?ContentTypeID=1</link><pubDate>Tue, 24 May 2016 05:23:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86deaed0-84b1-4cff-b955-2e29f2ae2043</guid><dc:creator>Boaz</dc:creator><description>&lt;p&gt;While I agree to the principal, most of Nordic&amp;#39;s examples &lt;strong&gt;do&lt;/strong&gt; interact with the soft device in IRQ context. I guess it depends on what a &amp;#39;minimal amount of work&amp;#39; is. The scheduler suggested by James looks promising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calling soft-device methods from UART/UARTE interrupt handler</title><link>https://devzone.nordicsemi.com/thread/53659?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 16:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22d1c867-58e4-4b36-9ba2-17d9aca80ce8</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;You&amp;#39;re right of course, but I can think of no reason you&amp;#39;d ever &amp;quot;want&amp;quot; to do this. Interupts are to be jumped to a minimal amount of work done, and get back to code. I&amp;#39;d NEVER call something like start/stop/connect from an ISR. That&amp;#39;s just asking for trouble. Flag or signal/mail and do it somewhere else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calling soft-device methods from UART/UARTE interrupt handler</title><link>https://devzone.nordicsemi.com/thread/53661?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 15:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18d1bb5-7ecc-4999-90dd-da3da4fbf082</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;It&amp;#39;s fine to call them from the interrupt as long as the interrupt runs at lower priority (ie a higher number) than the SVC call. So you can call the sd_* functions directly if you are running at priority 6 or 7 (the two APP LOW priorities) but not from 2 or 3 (the APP HIGH ones) as they are higher than the SVC call.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calling soft-device methods from UART/UARTE interrupt handler</title><link>https://devzone.nordicsemi.com/thread/53662?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 15:31:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73b1b4df-d614-4b6b-9494-e73d3007b05e</guid><dc:creator>James Yu</dc:creator><description>&lt;p&gt;You can use the scheduler library to transfer execution to the main context:
&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk52.v0.9.1%2Flib_scheduler.html"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>