<?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>SPI and TWI  run out of resources</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62849/spi-and-twi-run-out-of-resources</link><description>I&amp;#39;m in trouble... My design has 3 SPI devices, and at a late stage I ran out of GPIO so I added a I2C I/O expander before spinning and building my PCB without thinking too much of it. 
 But I belatedly found out about the shared resource, so I can&amp;#39;t add</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jun 2020 13:10:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62849/spi-and-twi-run-out-of-resources" /><item><title>RE: SPI and TWI  run out of resources</title><link>https://devzone.nordicsemi.com/thread/256193?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 13:10:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad6c3a70-87da-4d44-8c4b-92cde472d88b</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;There&amp;#39;s nothing that prevents you from switching between SPI and TWI though. See the&amp;nbsp;&lt;a title="Peripheral Resource Sharing (PRS)" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrfx__prs.html?cp=7_5_0_6_9_1_4"&gt;Peripheral Resource Sharing (PRS)&lt;/a&gt;&amp;nbsp;library for instance.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI and TWI  run out of resources</title><link>https://devzone.nordicsemi.com/thread/256152?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 10:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0460200-3e56-414a-b3f9-2e25e8628679</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;I&amp;#39;m guessing that would be possible with separate CS lines as one of the SPI devices isn&amp;#39;t written to that often ... I&amp;#39;ll have a think on that one thanks. Right now as I&amp;#39;ll need to respin my board anyway I&amp;#39;m thinking along the lines of using a simple shift register for the IO (well the &amp;quot;O&amp;quot; anyway) as it&amp;#39;s only for LEDs and relays - simple &amp;amp; cheap.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI and TWI  run out of resources</title><link>https://devzone.nordicsemi.com/thread/256118?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 08:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11e09e2b-e48a-4447-8c44-6c7415e84e21</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Can you use a one SPI instance for a multiple of the SPI devices? It is a bus after all.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI and TWI  run out of resources</title><link>https://devzone.nordicsemi.com/thread/256054?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2020 12:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5915d83a-d9d2-42e6-9fe2-5ee8c448a37c</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Both SPI and I&amp;sup2;C master can be done in software only.&lt;/p&gt;
[quote userid="78418" url="~/f/nordic-q-a/62849/spi-and-twi-run-out-of-resources"]Is it possible to dynamically reconfigure an instance between SPI &amp;amp; TWI? [/quote]
&lt;p&gt;Not with the nrf_drv or nrfx driver software out-of-the-box. You&amp;#39;d&amp;nbsp; have to modify the interrupt handler - it would need to detect which mode the peripherial is in and then call SPI or TWI handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>