<?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>Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25047/are-spi-interrupt-disabled-in-gpiote-handler</link><description>I am writing code for nrf51822 with softdevice and an accelerometer is connected to the nrf chip. The accelerometer provides interrupt to nrf chip over GPIOTE whenever there is data available to read. Upon receiving the GPIOTE interrupt, I am reading</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Sep 2017 11:43:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25047/are-spi-interrupt-disabled-in-gpiote-handler" /><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98628?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2017 11:43:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ccbf29e-ab24-4375-be6d-4b5439d62e5d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You should not set the IRQ priority to the ones reserved by the softdevice. The assert checking this might not be implemented unless &lt;code&gt;DEBUG_NRF&lt;/code&gt; or &lt;code&gt;DEBUG_NRF_USER&lt;/code&gt; is defined in the preprocessor symbols. Try setting the priority of the GPIOTE handler to 3 and priority of SPI to 1 instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98629?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2017 06:55:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d07c8f9-8762-4a12-aaca-f8b57d4dca54</guid><dc:creator>Prasad</dc:creator><description>&lt;p&gt;Yes, I did set the priority with softdevice present.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98627?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 14:32:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e71a6601-f83e-4143-b26b-8404d19f9489</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You should get an assert if you set the priority to one of the ones reserved for the softdevice, and &lt;code&gt;SOFTDEVICE_PRESENT&lt;/code&gt; is defined. Did you set this priority with softdevice present?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98626?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 14:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c2637f6-57a2-4980-bfcd-2fb6d76bafa2</guid><dc:creator>Prasad</dc:creator><description>&lt;p&gt;Thanks Jørgen, the issue got resolved when I changed &lt;code&gt;SPI_DEFAULT_CONFIG_IRQ_PRIORITY&lt;/code&gt; in sdk_config.h from 3 to 2. But I found this comment in sdk_config.h.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// &amp;lt;i&amp;gt; Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// &amp;lt;0=&amp;gt; 0 (highest) 
// &amp;lt;1=&amp;gt; 1 
// &amp;lt;2=&amp;gt; 2 
// &amp;lt;3=&amp;gt; 3 

#ifndef SPI_DEFAULT_CONFIG_IRQ_PRIORITY
#define SPI_DEFAULT_CONFIG_IRQ_PRIORITY 2
#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Does this mean that I cannot call softdevice APIs from the SPI event handler now?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98625?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 13:40:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021ac647-539d-4673-8b17-d296183a51f8</guid><dc:creator>Prasad</dc:creator><description>&lt;p&gt;I am using &lt;code&gt;NRF_DRV_SPI_DEFAULT_CONFIG&lt;/code&gt; to initialise my SPI instance and I have set &lt;code&gt;SPI_DEFAULT_CONFIG_IRQ_PRIORITY 3&lt;/code&gt; in sdk_config.h I guess I need to change this and check again...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Are SPI interrupt disabled in GPIOTE handler?</title><link>https://devzone.nordicsemi.com/thread/98624?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 10:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd12031-f939-45d0-934c-f1922882b1d7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What is the IRQ priority configured for the SPI master driver? Notice the comment from the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/hardware_driver_spi_master.html?cp=4_0_0_2_12_3#Events"&gt;SPI driver doucmentation&lt;/a&gt;: &lt;em&gt;&amp;quot;There is no context blocking in the interrupt handler. Therefore, it is assumed that the driver API will not be called from a context with higher priority than the instance interrupt, because this might cause driver failure.&amp;quot;&lt;/em&gt;. If SPI driver priority is set to &lt;code&gt;APP_IRQ_PRIORITY_LOWEST&lt;/code&gt;, you might see issues like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>