<?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>Merging Custom Service BLE project with SPI project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45089/merging-custom-service-ble-project-with-spi-project</link><description>Hi, I made a simple diagram of what my device should do: 
 
 The nRF52840 should receive data via SPI from another controller, mathematically process this data, and output result to an external DAC via SPI. 
 Data processing includes some parameters,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Mar 2019 12:52:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45089/merging-custom-service-ble-project-with-spi-project" /><item><title>RE: Merging Custom Service BLE project with SPI project</title><link>https://devzone.nordicsemi.com/thread/177335?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 12:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:934817f6-a41e-4c36-a3af-96d8083da93b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is very little overlap between a SPI example and a BLE example, so merging them should be quite straightforward. However, you should remember to start with the BLE example as the basis, as that use the SoftDevice and is typically most complex.&lt;/p&gt;
&lt;p&gt;The nRF52840 only have on CPU, so there are some limitations on what it can do simultaneously. Both the SPI and RADIO peripherals have DMA, but CPU is needed to set up communication etc, and in your case I assume a lot of CPU time is needed to do the math you mentioned. However, the SoftDevice will need the CPU regularly, and it will block the application from using the CPU during that times.&amp;nbsp; You should refer to &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_Spec/s140/latest/SDS/s1xx/processor_avail_interrupt_latency/ble_usage_patterns"&gt;Bluetooth Low Energy processor usage patterns&lt;/a&gt;&amp;nbsp;for details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>