<?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>BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/581/ble-soft-device-spi</link><description>Hi, 
 I&amp;#39;ve noticed that when using SPI without a Soft Device or BLE function calls, the SPI peripheral is easy to control and operates correctly. 
 This nice operation stops when we try to put in the Soft Device + BLE API calls. I have cut+pasted code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Oct 2013 08:55:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/581/ble-soft-device-spi" /><item><title>RE: BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/thread/3020?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2013 08:55:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fa08d90-8e60-417f-9b3c-290687b878f0</guid><dc:creator>Stefan</dc:creator><description>&lt;p&gt;There&amp;#39;s some sample code here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/index.php/best-place-to-get-started#reply-316"&gt;devzone.nordicsemi.com/.../best-place-to-get-started&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/index.php/ble-stack-server-receiverlink-loss#reply-1830"&gt;devzone.nordicsemi.com/.../ble-stack-server-receiverlink-loss&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with a new  .c file for TWI communication when using it with S110 BLE stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/thread/3019?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2013 13:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c87a7a0-1a84-4283-bfc0-bf42257be04c</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I think that Hailang is correct. As you can see in the section he refers to, the PPI is restricted when the softdevice is enabled, so if you access it directly, this will cause a HardFault.&lt;/p&gt;
&lt;p&gt;The default implementation of twi_hw_master.c uses the PPI interface directly (i.e. writes to NRF_PPI-registers), and as you have discovered, this will cause a HardFault if the softdevice is enabled. If you use the TWI with the softdevice enabled, you should make sure to change this to use the softdevice API instead.&lt;/p&gt;
&lt;p&gt;Please note that this API will function only when the softdevice is enabled, so make sure to also do any TWI initalization after sd_softdevice_enable().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/thread/3018?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2013 03:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee7569e5-b9a6-4e5f-8f68-9cdee3d55719</guid><dc:creator>Jamie</dc:creator><description>&lt;p&gt;Hi Hailang,&lt;/p&gt;
&lt;p&gt;THanks for your reply and suggestion. After further testing, it seems SPI might not be the issue at all. The part I am configuring with SPI is in fact being configured properly to generate an interrupt signal, but as soon as the interrupt comes in, the NRF51822 goes to the HardFault handler. This does not happen when the softdevice is not present. I have tried configuring the interrupt in two ways, using the default CMSIS NVIC functions, as well as the sd_nvic_* functions, with no success found with either one.&lt;/p&gt;
&lt;p&gt;Any suggestions or further readings for me to try?&lt;/p&gt;
&lt;p&gt;Thanks much,
Jamie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/thread/3017?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2013 12:32:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ce1fb74-757e-4d8e-9a9e-d32d5e699379</guid><dc:creator>Hailang</dc:creator><description>&lt;p&gt;Hi Jamie,&lt;/p&gt;
&lt;p&gt;Have you checked &amp;quot;6 S110 resource requirements&amp;quot; in &amp;lt;S110_SoftDevice_Specification v1.1.pdf&amp;gt;?
You may encounter certain hardware resource conflict. For example, &amp;quot;6.4 Programmable Peripheral Interconnect (PPI)&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Soft Device + SPI</title><link>https://devzone.nordicsemi.com/thread/3016?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2013 04:47:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0717c211-5945-46ba-8036-3665597b7f30</guid><dc:creator>Jamie</dc:creator><description>&lt;p&gt;Some additional information: due to the soft device&amp;#39;s presence, in Keil I change the memory map from:&lt;/p&gt;
&lt;p&gt;Start 0x0 Size 0x14000
Start 0x20000000 Size 0x2000&lt;/p&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p&gt;Start 0x2000 (this one is from memory, may not be correct) Size 0x2B000
Start 0x20002000 Size 0x2000&lt;/p&gt;
&lt;p&gt;Could there be a memory mapping conflict of the soft device with the SPI peripheral? Are there any APIs for the SPI that I should be aware of (I cannot find this in the docs)?&lt;/p&gt;
&lt;p&gt;Thanks,
Jamie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>