<?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>SoftDevice 132, sdk 11, enter/exit nvic critical region</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21382/softdevice-132-sdk-11-enter-exit-nvic-critical-region</link><description>Hello, 
 I would like to ask your help for examples of nRF52 code, when entering and exiting critical regions (disabling interrupts without switching off a bluetooth connection) like: 
 sd_nvic_critical_region_enter();

//code to execute

sd_nvic_critical_region_exit</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Apr 2017 09:43:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21382/softdevice-132-sdk-11-enter-exit-nvic-critical-region" /><item><title>RE: SoftDevice 132, sdk 11, enter/exit nvic critical region</title><link>https://devzone.nordicsemi.com/thread/83802?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 09:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acf6a09e-09bc-41f1-81f5-318ab5413ad5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Jimmy,&lt;/p&gt;
&lt;p&gt;the &lt;code&gt;p_is_nested_critical_region&lt;/code&gt; is an output parameter, not an input , please see the documentation of the SoftDevice NVIC public functions, found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___n_r_f___n_v_i_c___f_u_n_c_t_i_o_n_s.html#ga3cb70a461e2e1421bd812c5c0d5ad0c0"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you call &lt;code&gt;sd_nvic_critical_region_enter&lt;/code&gt; within another critical region, then   &lt;code&gt;p_is_nested_critical_region&lt;/code&gt;is set to 1.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re not using nested critical regions then just provide a uint8_t pointer as a parameter and ignore the output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>