<?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 Instances of SPI doesn&amp;#39;t seem to be working.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39003/multiple-instances-of-spi-doesn-t-seem-to-be-working</link><description>Hi Everyone 
 I am trying to use 2 instances of SPI SPI0 AND SPI2 for Epaper Display and MCP2515 CAN bus module respectively. 
 Epaper and CAN are working fine if one of them is run. However if i run both of them , only one of the Peripherals work either</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 May 2019 22:51:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39003/multiple-instances-of-spi-doesn-t-seem-to-be-working" /><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/188047?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 22:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed5ad88d-fc98-4d49-b6c1-71b1bb1a700f</guid><dc:creator>scla</dc:creator><description>&lt;p&gt;Hi, I think I am running into this same issue. I know your post is several months old, but any chance you have this resolved? I noticed that when I compile the application with the optimizer set to &amp;quot;Debug&amp;quot; instead of &amp;quot;Optimize for size&amp;quot; (or levels 1-3), everything works fine. If I at all have gcc optimize, it looks like data sent to peripheral A is going to peripheral B.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/160432?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 15:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e32e386-1865-489c-b0d1-7d6e1c12aaa6</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;How about using a 1kohm serie resistor in series with the MISO pin?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/160303?ContentTypeID=1</link><pubDate>Wed, 05 Dec 2018 06:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7640912e-9773-4ab0-96e6-5f5df86aaef0</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;&amp;nbsp;So far we are not using the Epaper, But still i would like to let you know that&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The problem was whenever i remove the Epaper, then CAN Works&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But whenever i connect the epaper , CAN initalization gets failed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I saw on logic analyzer which showed me that Epaper was causing the BUSY(MISO) pin to be low and hence instead of data that was supposed to be on MISO Lines , it became 0 .&lt;/p&gt;
&lt;p&gt;So CAN&amp;nbsp; Initilazation failed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do You have any workaround for this in your mind?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/158421?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 13:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c56b4fd1-c3dc-4c53-9754-56cdaacf9cd5</guid><dc:creator>Kenneth</dc:creator><description>[quote user="Rajat"]But when i connect the epaper , CAN module doesn&amp;#39;t get initalised.[/quote]
&lt;p&gt;If you look at a logic analyzer plot between the two you can see what difference?&lt;/p&gt;
&lt;p&gt;Maybe if you do a dump of the SPI configuration registers with and without the epaper you can identify the difference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/158285?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 05:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d5463e1-1d45-4ee0-9831-9aad5de532de</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;No, They are not overlapping with other peripherals.&lt;/p&gt;
&lt;p&gt;This is what is happening now.&lt;/p&gt;
&lt;p&gt;If i remove the Epaper from the hardware and test, it works fine.&lt;/p&gt;
&lt;p&gt;But when i connect the epaper , CAN module doesn&amp;#39;t get initalised.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/151055?ContentTypeID=1</link><pubDate>Mon, 01 Oct 2018 18:00:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d95a7b5-7750-4177-816a-3e3e404abde6</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you checked that the SPI instances (0 and 2) you are using are not overlapping with other peripherals you may have enabled:&lt;br /&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/memory.html?cp=2_0_0_3_1_3#topic"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/memory.html?cp=2_0_0_3_1_3#topic&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you able to replicate this by simply extending the SDK example to use instance 0 and 2?&lt;br /&gt;Try \nRF5_SDK_15.2.0_9412b96\nRF5_SDK_15.2.0_9412b96\examples\peripheral\spi\&lt;/p&gt;
&lt;p&gt;E.g. in main.c add:&lt;br /&gt;static const nrf_drv_spi_t spi2 = NRF_DRV_SPI_INSTANCE(2); /**&amp;lt; SPI instance 2. */ //&amp;nbsp;#define SPI2_ENABLED 1 in sdk_config.h&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/150817?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 10:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:121afda7-e226-46b7-bd20-fe6c0b62a0d0</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;On a logic analyzer on epaper pins , it shows me that &amp;quot;The inital idle state of clk line does not match the settings&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/150803?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 07:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4533f968-4e1b-466b-b70b-ed3768568c6c</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Except the CS pin , all other pins are same. Now i changed&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/150799?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 06:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16df9de1-a9f8-4fe2-b5c0-fcdade45fe62</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Also&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using SPI instance 0 for Epaper&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SPI Instance 2 for CAN&lt;/p&gt;
&lt;p&gt;TWI instance 1 for an I2C Sensor (Because SPI and TWI are shared resources, if i am not wrong)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple Instances of SPI doesn't seem to be working.</title><link>https://devzone.nordicsemi.com/thread/150793?ContentTypeID=1</link><pubDate>Fri, 28 Sep 2018 04:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea776cb0-2223-45d1-b1a3-c165f57a9387</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;The pins for Epaper and Can bus Module are entirely different&lt;br /&gt;(Just in case it helps )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>