<?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>Changing the SPI Modes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68926/changing-the-spi-modes</link><description>The design has 2 sensors on SPI with mode 3 and the nrf21540 which is mode 0. Can you have 2 different Modes on the same spi bus? 
 would i use the SPI transaction manager library to accomplish this? 
 do i need to enable and disable the spi bus to change</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Dec 2020 13:47:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68926/changing-the-spi-modes" /><item><title>RE: Changing the SPI Modes</title><link>https://devzone.nordicsemi.com/thread/282897?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 13:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77d94e1c-9bfc-48c5-82b8-71fd82a13e3e</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the SPI Modes</title><link>https://devzone.nordicsemi.com/thread/282707?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2020 14:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5461e4b2-46c4-4588-9b0f-2e2db8f5f21c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Each assigned SPI pin can only be driven by one instance of the SPI peripheral at a time.&amp;nbsp;You would therefore have to either move the nRF21540 to other pins, or you could use the same pins and reinitialize the SPI bus between each time you need to switch modes. You can use the transaction manager to do this, see the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_nrf_twi_mngr.html?cp=7_1_3_55"&gt; documentation on the transaction manager&lt;/a&gt; which highlights how you can schedule transfers with different HW settings.&lt;/p&gt;
&lt;p&gt;You can also use the lower level SPI driver, and just re-initialize the module with the appropriate SPI mode between each transfer.&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>