<?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>Critical region called in handlers freeze app</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9057/critical-region-called-in-handlers-freeze-app</link><description>I am trying to enable a critical section in handler. I need to update a sensitive global variable when a button event occurs, and the fact to enable/disable the interrupt freeze the app. 
 My code in the button event handler, the first APP_ERROR_CHECK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Sep 2015 08:53:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9057/critical-region-called-in-handlers-freeze-app" /><item><title>RE: Critical region called in handlers freeze app</title><link>https://devzone.nordicsemi.com/thread/33358?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2015 08:53:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3df2c27a-977a-4436-ab0f-4809ddbe1b56</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;yeah - often HIGH works fine - just if you need to call the softdevice back you have to lower it, or use the scheduler. I&amp;#39;ve found generally LOW Is good enough, chip&amp;#39;s not that busy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Critical region called in handlers freeze app</title><link>https://devzone.nordicsemi.com/thread/33357?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2015 08:51:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6bcd9c0-6b7b-428e-9fb1-e29fb3b68cb8</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Thank you very much! GPIOTE IRQ priority was defined in the nrf_drv_config.h file that I copied from SDK exemple project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Critical region called in handlers freeze app</title><link>https://devzone.nordicsemi.com/thread/33356?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2015 08:29:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f19783-b254-4fde-a78b-dde58312dd22</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Usual problem - calling softdevice functions from an interrupt context with higher priority than the SVC call. I&amp;#39;ll assume that your GPIOTE IRQ priority is APP_PRIORITY_HIGH, if you want to call softdevice functions from it, it needs to be LOW, or you need to use the scheduler.&lt;/p&gt;
&lt;p&gt;And the app isn&amp;#39;t &amp;quot;freezed&amp;quot;, it&amp;#39;s in the hardfault handler, hitting break in the debugger should show you that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>