<?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>If the softdevice is enabled, can I call the function of &amp;quot;nrf_mtx.h&amp;quot;? If I could, would something bad happen?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62151/if-the-softdevice-is-enabled-can-i-call-the-function-of-nrf_mtx-h-if-i-could-would-something-bad-happen</link><description>Hi. 
 As the subject said,I want to know that if the softdevice is enabled, can I call the function of &amp;quot;nrf_mtx.h&amp;quot;? 
 such as:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jun 2020 08:54:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62151/if-the-softdevice-is-enabled-can-i-call-the-function-of-nrf_mtx-h-if-i-could-would-something-bad-happen" /><item><title>RE: If the softdevice is enabled, can I call the function of "nrf_mtx.h"? If I could, would something bad happen?</title><link>https://devzone.nordicsemi.com/thread/253455?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 08:54:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d557c944-762e-4a4c-89da-972d2af58d06</guid><dc:creator>Gray</dc:creator><description>&lt;p&gt;Ok, I understand. Thanks again for your answers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If the softdevice is enabled, can I call the function of "nrf_mtx.h"? If I could, would something bad happen?</title><link>https://devzone.nordicsemi.com/thread/253412?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 05:47:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8d77b16-7f6e-49ba-87b0-7dc6748dc738</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, if you&amp;#39;re using the nrf_mtx library in an application also sporting the SoftDevice the nrf_mtx functions will be prone to interrupts by the SoftDevice. The sd_mutex functions will be handled by the SoftDevice itself, so the SoftDevice will make sure that it won&amp;#39;t be interrupted.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If the softdevice is enabled, can I call the function of "nrf_mtx.h"? If I could, would something bad happen?</title><link>https://devzone.nordicsemi.com/thread/253298?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 13:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f890e8-11cb-4a0e-8dd0-ac29223e87fb</guid><dc:creator>Gray</dc:creator><description>&lt;p&gt;Hi,Simon.&lt;/p&gt;
&lt;p&gt;Thanks for your answers.&lt;/p&gt;
&lt;p&gt;And can I understand that when using the SoftDevice,I can call the nrf_mtx_trylock() function?But the calling process can be interrupted?And the sd_mutex function will not be interrupted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: If the softdevice is enabled, can I call the function of "nrf_mtx.h"? If I could, would something bad happen?</title><link>https://devzone.nordicsemi.com/thread/253253?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 10:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a4f0c2f-5dd3-46e5-80e7-7e37afb5a000</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;When using the SoftDevice, I would suggest using the sd_mutex functions which are an implementation of mutex that can be used by the application. The mutex functionality itself is handled by the SoftDevice, and due to the characteristics of SVC calls in the ARM architecture, it&amp;#39;s atomic. When the SoftDevice is running, you can never interrupt the &amp;quot;lower stack&amp;quot; interrupts. Here, the mutex is atomic, in the sense that grabbing/releasing it is a process that can&amp;#39;t be interrupted as it will run through the SoftDevice supervisor call.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>