<?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 send data error at sd_nvic_DisableIRQ</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12111/spi-master-send-data-error-at-sd_nvic_disableirq</link><description>Hi all, 
 We have a issues with the SPI communication and hope someone could help us.
Using SDK 8.0.0 and Soft Device S110 8.0.0 
 code process step: 
 
 
 enable ble stack, and ble init. 
 
 
 spi_master_init(SPI_MASTER_0, spi_master_0_event_handler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Mar 2016 01:09:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12111/spi-master-send-data-error-at-sd_nvic_disableirq" /><item><title>RE: spi master send data error at sd_nvic_DisableIRQ</title><link>https://devzone.nordicsemi.com/thread/45817?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2016 01:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26ed449e-f2b4-4b8d-a3c8-df026fb12c37</guid><dc:creator>Terry.li</dc:creator><description>&lt;p&gt;Thanks! the bug fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: spi master send data error at sd_nvic_DisableIRQ</title><link>https://devzone.nordicsemi.com/thread/45816?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 12:39:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0938091-1dea-4694-9d87-98e11ddafc76</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you check if the irq_type value is `SPI0_TWI0_IRQn                =   3, at the time of this call.
If it is so, then this is some softdevice bug in that version. I see that in latest SDK they have removed the sd_call and called direct NVIC_ functions.&lt;/p&gt;
&lt;p&gt;Quick fix would be to replace all sd_nvic functions with NVIC_ functions directly.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_ERROR_CHECK(sd_nvic_ClearPendingIRQ(p_spi_instance-&amp;gt;irq_type));
APP_ERROR_CHECK(sd_nvic_DisableIRQ(p_spi_instance-&amp;gt;irq_type));
APP_ERROR_CHECK(sd_nvic_ClearPendingIRQ(p_spi_instance-&amp;gt;irq_type));
APP_ERROR_CHECK(sd_nvic_SetPriority(p_spi_instance-&amp;gt;irq_type, p_spi_master_config-&amp;gt;SPI_PriorityIRQ));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;etc&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NVIC_ClearPendingIRQ(p_spi_instance-&amp;gt;irq_type);
NVIC_DisableIRQ(p_spi_instance-&amp;gt;irq_type);
NVIC_ClearPendingIRQ(p_spi_instance-&amp;gt;irq_type);
NVIC_SetPriority(p_spi_instance-&amp;gt;irq_type, p_spi_master_config-&amp;gt;SPI_PriorityIRQ);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;etc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>