<?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>Multiple nRF8001 connecting to one device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4345/multiple-nrf8001-connecting-to-one-device</link><description>Hi all, 
 I am using the BLE nRF8001 and EFM32 (ARM Cortex M3). I used the following SDK for connecting the modules using ACI (SPI). github.com/.../ble-sdk-efm32 
 Now I want to use 2 SPIs of my EFM32 in order to connect them to 2 nRF8001, simultaneously</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Oct 2015 05:49:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4345/multiple-nrf8001-connecting-to-one-device" /><item><title>RE: Multiple nRF8001 connecting to one device</title><link>https://devzone.nordicsemi.com/thread/15453?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2015 05:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94c18263-f080-465e-b4ad-bbe17225d89d</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;The nRF8001 drivers do not support multiple nRF8001s out of the box.
The typical changes need
The nRF8001 can be used in polling mode and the EFM32 driver for nRF8001 uses it in polling mode.
You need to have the pins available, you can share the MISO, MOSI and SCK but you need to have separate lines for REQN and RDYN.
The simplest way would be to have 2 code instances of the driver with separate name spaces so that they do not share any of the code or the data (i.e. queues). This will double the code and RAM usage.
Another method would be to make the below modifications:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have 2 data structures instead of the init i.e. aci_state, i.e. Setup data and pins used. Add an instance data member so that you can differentiate between the 2 nRF8001s.&lt;/li&gt;
&lt;li&gt;All commands and events will need to have the instance number so that the driver can see which nRF8001 instance needs to be used.&lt;/li&gt;
&lt;li&gt;The driver has to be modified so that when the Commands are being generated it maps the instance to the correct ACI s to be used, when the Events are generated the data is tagged with the instance based on the ACI pins the Event was received on.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I know this is a bit late but I hope it helps other users with a similar question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple nRF8001 connecting to one device</title><link>https://devzone.nordicsemi.com/thread/15451?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2014 10:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d702f45-b195-4c8b-9b29-9c31eed60ec3</guid><dc:creator>mehdi</dc:creator><description>&lt;p&gt;Yes, I want to configure 2 SPI and connect each to one nRF8001. but I have problem in configuration, I dont know, maybe in interrupt handler or hardware configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple nRF8001 connecting to one device</title><link>https://devzone.nordicsemi.com/thread/15452?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2014 09:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f35417a-f533-4f9f-9a41-92f1369fb8a8</guid><dc:creator>mehdi</dc:creator><description>&lt;p&gt;Yes, I want to configure 2 SPI and connect each to one nRF8001. but I have problem in configuration, I dont know, maybe in interrupt handler or hardware configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple nRF8001 connecting to one device</title><link>https://devzone.nordicsemi.com/thread/15450?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2014 11:23:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb86287-a5dc-49f8-8ff9-c44b1531b172</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if I understand you correctly, so to be sure. You connect two nRF8001 to your EFM32. The EFM32 has two SPI interfaces and the two nRF8001 are connected to one each?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>