<?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>Toggling between SPI slaves with nrf_spi_mngr_perform  (as opposed to nrf_spi_mngr_schedule)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34099/toggling-between-spi-slaves-with-nrf_spi_mngr_perform-as-opposed-to-nrf_spi_mngr_schedule</link><description>We&amp;#39;ve got two SPI slaves that we need to talk to with the 52840 (PCA10056 dev kit for now) using SPI Manager. In the initialization of these devices, I&amp;#39;d like to use nrf_spi_mngr_perform to set all the initial registers values, read them back, and verify</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 May 2018 14:19:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34099/toggling-between-spi-slaves-with-nrf_spi_mngr_perform-as-opposed-to-nrf_spi_mngr_schedule" /><item><title>RE: Toggling between SPI slaves with nrf_spi_mngr_perform  (as opposed to nrf_spi_mngr_schedule)</title><link>https://devzone.nordicsemi.com/thread/132091?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 14:19:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a9e8899-2dd4-488e-9033-cef3bd12d522</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, I think implementing this yourself would be the best solution.&amp;nbsp;I have not seen other customers requesting this&amp;nbsp;use-case of doing blocking transfers to different devices using this library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggling between SPI slaves with nrf_spi_mngr_perform  (as opposed to nrf_spi_mngr_schedule)</title><link>https://devzone.nordicsemi.com/thread/131331?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 09:34:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6ffa257-6f12-44a5-9953-d2f8e2d9e467</guid><dc:creator>ejg2putt</dc:creator><description>&lt;p&gt;That is correct, I want to perform multiple transfers to initialize and verify the two SPI devices - requiring that I can switch CS/GPIO as various points. &amp;nbsp; &amp;nbsp;The advantage of using _perform is that I could simply setup the multiple transfers and fire off the sequence of init commands. &amp;nbsp;Essentially issue all the command synchronously instead of asynchronously. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;So without a callback mechanism or some way to intervene between the transfers, the best way to do this is setup a series of individual commands and manage the CS/GPIO that way?&lt;/p&gt;
&lt;p&gt;I guess I could setup the same blocking loop in my code for _schedule that _perform&amp;nbsp;implements, either using my own &amp;quot;transaction_in_progess&amp;quot; flag or the cb_data.transaction_in_progress if that&amp;#39;s available.&lt;/p&gt;
&lt;p&gt;Easy enough to implement, it would be nice to have a &amp;quot;synchronous&amp;quot; way to handle multiple commands to multiple devices.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Ed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Toggling between SPI slaves with nrf_spi_mngr_perform  (as opposed to nrf_spi_mngr_schedule)</title><link>https://devzone.nordicsemi.com/thread/131309?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 08:32:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a2aa823-b212-40e1-848c-a6aff6f9e9e5</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure I understand what you are asking. Do you want to perform multiple transfers using&amp;nbsp;nrf_spi_mngr_perform, and these transfers should have different CS pins?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_spi_mngr_perform use&amp;nbsp;nrf_spi_mngr_schedule to execute the operations, it just have a blocking while loop at the end to prevent the function from returning before the operations are complete. The functionality should be the same as using&amp;nbsp;nrf_spi_mngr_schedule directly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>