<?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>how to switch peripheral use at runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19229/how-to-switch-peripheral-use-at-runtime</link><description>Hello, 
 My setup is as such.
I use SPIM1 and SPIM2 all the time. SPIM1 goes to a set of MEMs devices, and SPIM2 is dedicated to a Memory module. 
 My device runs in of of two modes which are mutually exclusive. In one mode I run SPIS0 and talk to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Jan 2017 09:19:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19229/how-to-switch-peripheral-use-at-runtime" /><item><title>RE: how to switch peripheral use at runtime</title><link>https://devzone.nordicsemi.com/thread/74500?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 09:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f1054c8-612f-4fb2-ba81-082da87074b7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot use several peripheral instances that share the same IDs/base addresses at the same time. &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fmemory.html&amp;amp;cp=2_2_0_7_3&amp;amp;anchor=topic"&gt;Here&lt;/a&gt; is the table of which IDs/base address the different peripheral instances use. Here you can see that e.g. TWIS0 and SPIS0 have the same ID, and cannot be used together.&lt;/p&gt;
&lt;p&gt;But, you can use peripheral resource sharing(&lt;code&gt;PERIPHERAL_RESOURCE_SHARING_ENABLED&lt;/code&gt;). This enables you to first use e.g. TWIS0, then you have to uninitialized it, and then you can use SPIS0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>