<?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>Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111921/enable-4-spi-instances-in-nrf52840</link><description>Hi, 
 I am using nrf52840. we have already used 3 SPI instance (SPIM1, SPIM 2, SPIM 3). wanted to use one more SPI instance i.e. SPIM 0. but if I enable this I am getting &amp;quot; &amp;#39;NRF_DRV_SPI_INSTANCE_SPI_INSTANCE_0&amp;#39; undeclared here (not in a function)&amp;quot; this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Jul 2024 06:49:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111921/enable-4-spi-instances-in-nrf52840" /><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/492869?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 06:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d57feb1-c0bf-4b23-92e7-4fbecabce8ab</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Shreya,&lt;/p&gt;
&lt;p&gt;Thanks for sharing the update. I am glad that you have found the root cause.&lt;/p&gt;
&lt;p&gt;Now it makes sense why this&amp;nbsp;&lt;span&gt;&amp;#39;NRF_DRV_SPI_INSTANCE_SPI_INSTANCE_0&amp;#39; undeclared here&amp;#39;&amp;#39; error. SPI and TWI peripherals can operate simultaneously. But it should not share the same instance IDs (same registers or resources).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When using a peripheral that share an ID, we need to disable the previously used peripheral,&amp;nbsp;&lt;/span&gt;remove any PPI connections set up for the peripheral that is being disabled, clear all bits in the INTEN register, explicitly configure the peripheral that we enable and should not rely on configuration values that may be inherited from the peripheral that was disabled, and then enable the now configured peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/492208?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2024 10:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c6cdc65-314a-4088-9827-448dc2cc33f2</guid><dc:creator>Shreya J B</dc:creator><description>&lt;p&gt;Hi Kazi,&lt;/p&gt;
&lt;p&gt;Thank you. I got to know the issue. &lt;span&gt;The SPI0 instance share its peripheral address with TWI0,&amp;nbsp;and we are using TWI0 already. hence we were not able to use SPI0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/491873?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2024 14:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39893897-7ec7-4a94-a2a0-a34509062f67</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Helo Shreya,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. Can you please send me your application so that I can look at from my side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/490624?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 12:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:763b6991-073e-4ca8-b702-67d396762f37</guid><dc:creator>Shreya J B</dc:creator><description>&lt;p&gt;Please reply us as soon as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/490313?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 13:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aef4011-6c74-482d-99f1-1cbd2fad1615</guid><dc:creator>Shreya J B</dc:creator><description>&lt;p&gt;Hi Kazi,&lt;/p&gt;
&lt;p&gt;Thank you for reaching out.&lt;/p&gt;
&lt;p&gt;For SPI0, we are using the following pins&lt;/p&gt;
&lt;p&gt;MISO, MOSI, SCLK, CS.&lt;/p&gt;
&lt;p&gt;I have double-checked the pin numbers in the overlay, and they are correctly assigned according to the board connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you need any further details or if there are additional considerations I should check, please let me know.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Shreya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable 4 SPI instances in nrf52840</title><link>https://devzone.nordicsemi.com/thread/488298?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 11:30:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f161401-e99c-409c-a897-5d913770d1b1</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Which pins are you using for setting SPI0 as instance? Are the pin numbers correct in overlay according to the board connection?&lt;/p&gt;
&lt;p&gt;Sometimes other peripherals also use the same pin as SPIs. Have you checked if there is any overlapping of pin using?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>