<?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>SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5463/spi-master-error-in-sd_nvic_clearpendingirq</link><description>I am using SDK 7.2 and Soft Device S110 7.1. I am also using the new version of nrf51 which has 32K RAM. I am not using the DK, but a custom board, though I see the same error on both. 
 I have a program that is attempting to start SPI Master to connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 16 May 2015 01:41:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5463/spi-master-error-in-sd_nvic_clearpendingirq" /><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19072?ContentTypeID=1</link><pubDate>Sat, 16 May 2015 01:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:076a15b5-c3a4-427b-87e9-9676b1ab6d52</guid><dc:creator>Maxwell</dc:creator><description>&lt;p&gt;Great answer. this one worked for me. Indeed when the ble stack is included, you must initialize the peripheral as in their examples. I used s110 SDK 8.0.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19074?ContentTypeID=1</link><pubDate>Sun, 08 Feb 2015 16:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e772a93c-84b9-48fb-9e98-f2232c253cb9</guid><dc:creator>eric ely</dc:creator><description>&lt;p&gt;That was the answer. Thanks for the help, so much had changed from SDK5.2 to SDK7.2 that I didn&amp;#39;t catch this one either. I have everything working again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19071?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 16:22:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b915ea2-c12b-4aed-a253-0cc487874f3d</guid><dc:creator>eric ely</dc:creator><description>&lt;p&gt;Looking back through 5.2, there doesn&amp;#39;t seem to be any sense of this. The SPI example doesn&amp;#39;t even appear to set up the interrupt priorities at all, it just directly writes to/reads from the register. That would explain why this worked in 5.2 but not 7.2.&lt;/p&gt;
&lt;p&gt;By looking in the makefile of SDK7.2 SPI Master example, I can see it is including nrf_soc_nosd/nrf_soc.c.&lt;/p&gt;
&lt;p&gt;Man, what a hard way to learn this simple lesson.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19073?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 16:06:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff91ac38-b6cd-476f-b1ca-083a59cd632e</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Don&amp;#39;t know if it changed since 5.2, lots did and I never did much with that release, 6.x was out when I started on Nordic. Yes the nrf_soc_nosd folder is new, although the concept of having some of the sd_* functions stubbed out when you&amp;#39;re not using a softdevice was in 6.x, it was just called something else. This is a little more consistent (although it would be even more consistent if it were under the softdevices folder, in my opinion, would make the include paths easier). I don&amp;#39;t even appear to have 5.x on my machine so I can&amp;#39;t look to see if the spi code uses sd_* functions or calls the NVIC calls directly. The way it appears to me is that Nordic has gone over to using the sd_* calls everywhere, when you have a softdevice they are SVC calls, when you include the nosd header file, they just map to NVIC calls, so one codebase fits all. .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19070?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 15:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0200444-f757-42b4-8e00-3e6bac1e90ae</guid><dc:creator>eric ely</dc:creator><description>&lt;p&gt;Thanks, I will try this out.&lt;/p&gt;
&lt;p&gt;Is this documented somewhere? Is this a new change in SDK7.1? I did not notice this. I had used SPI without SoftDevices in SDK5.2, and while the libraries have vastly changed since then, I never had this issue. Also, I do not see a nrf_soc_nosd folder in SDK5.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19069?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 03:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b956c332-6b7d-4a37-8ba0-dd61ae9b8e8e</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If you&amp;#39;re built against the softdevice (where &amp;#39;built&amp;#39; in this case means the nrf_sof.h file imported is one of the softdevice ones as opposed to the no-softdevice one) then yes you need it enabled in order to call sd_nvic_* because the function makes a SVC call into the softdevice. The first thing that does in every case is check if the SD is enabled or not and fails with that error if it&amp;#39;s not.&lt;/p&gt;
&lt;p&gt;If you are building to use without a softdevice, you can still use the SPI functions, just change your include path to have drivers_nrf/nrf_soc_nosd instead of softdevice/s110 (for instance) so you pick up the stub functions which don&amp;#39;t call into the softdevice but just calls the underlying NVIC calls directly.  If you&amp;#39;re building for the softdevice then yes you need to at least enable it, even if you start no btle services.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19068?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 03:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6aff83da-2ded-4e09-9317-35b838476b2e</guid><dc:creator>eric ely</dc:creator><description>&lt;p&gt;Do I need the SoftDevice enabled to use SPI? I don&amp;#39;t see that anywhere in the examples.&lt;/p&gt;
&lt;p&gt;According to the following documentation, the Soft Device can either be enabled or disabled: &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.2.0/s110/html/a00006.html"&gt;developer.nordicsemi.com/.../a00006.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So sorry, next time I ask for help, I won&amp;#39;t use my Please and Thank You&amp;#39;s.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master Error in sd_nvic_ClearPendingIRQ</title><link>https://devzone.nordicsemi.com/thread/19067?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2015 03:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84e6094b-e5a2-4354-b669-a0bba2854d06</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Error 2 is also ... NRF_ERROR_SOFTDEVICE_NOT_ENABLED and I don&amp;#39;t see anywhere in the code you  posted where are actually enabling it.&lt;/p&gt;
&lt;p&gt;Yes it&amp;#39;s annoying that the error codes overlap like that.&lt;/p&gt;
&lt;p&gt;btw. Don&amp;#39;t really need the &amp;quot;PLEASE HELP!!!&amp;quot;, anyone posting a question here is already asking for help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>