<?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>SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35923/spim---daisy-chain</link><description>Hi, 
 I need to connect multiple SPI slaves in a daisy chain. It seems that using nrfx_spim_init once and nrfx_spim_xfer at each transfer is the simplest way to go using the DMA. I haven&amp;#39;t found, however, a way to dynamically choose and control the CS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Jul 2018 16:05:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35923/spim---daisy-chain" /><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138581?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 16:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64f4e420-2f4d-49b8-92d3-d0a24f0aaf37</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Thanks, Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138577?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 16:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98997ec1-20bf-4e04-960f-862189d7e1a7</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;In terms of cpu cycles it is certainly not efficient, but unfortunately the nRF52840 SPIM HW has limited support for HW CS pin control (only supported on SPIM3) and there are no APIs in the SPIM driver that allows you to change the CS pin seamlessly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I would recommend depends on your skill level and requirements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The easiest&amp;nbsp;option is to do as I suggested above. It will be simple to implement, but will waste CPU cycles and current in the long run.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If you care about efficiency and every CPU cycle counts, then you probably need to write your own driver.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Whether it is worth it is up to you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138489?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 11:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57240207-5acd-4ce5-8a5a-2df0e2e169be</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;This seems to be an inefficient implementation. I&amp;#39;m interested in the recommended way to do so&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138484?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2018 11:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d407180e-dbd4-4fdc-9b17-2e37ab780026</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I suggest that&amp;nbsp; you un-initialize the driver with&amp;nbsp;nrfx_spim_uninit() and then re-initialize it again each time you change the CS pin. You could probably &amp;quot;bypass&amp;quot; the driver, and change the pin directly in the SPIM registers, but that would leave you vulnerable to timing issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138284?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 12:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b8806fe-f291-4182-a48a-3306b447387d</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My question was how to do this in software... Preferably using the SPIM driver interface.&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM - daisy chain</title><link>https://devzone.nordicsemi.com/thread/138278?ContentTypeID=1</link><pubDate>Fri, 29 Jun 2018 12:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5009028c-ce02-4355-8ba6-42abd64c4483</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately there is no elegant and autonomous way&amp;nbsp;of changing CS pin between transfers. It needs to be re configured in software.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>