<?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>nRF52840-DK SPI communication with digital potentiometer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56591/nrf52840-dk-spi-communication-with-digital-potentiometer</link><description>Hello, 
 
 I&amp;#39;m a beginner and I have lots of questions. So I wanna communication with MCP4110 chip. But I can&amp;#39;t. I configured SS, MISO and CLK pin in sdk_config.h. (SEGGER Embedded Studio, Mac OS). So I wrote this code: 
 
 (0-4 buffers is sinus generator</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 18 Jan 2020 11:17:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56591/nrf52840-dk-spi-communication-with-digital-potentiometer" /><item><title>RE: nRF52840-DK SPI communication with digital potentiometer</title><link>https://devzone.nordicsemi.com/thread/229721?ContentTypeID=1</link><pubDate>Sat, 18 Jan 2020 11:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb32acb-25d5-42e0-94cf-4b92d3aeae15</guid><dc:creator>parraghb</dc:creator><description>&lt;p&gt;If I clear this __WFE line, the code still doesn&amp;#39;t work. I think the problem will be in the slave.&amp;nbsp;Please check MCP &lt;a href="http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf" rel="noopener noreferrer" target="_blank"&gt;datasheet&lt;/a&gt; page 18. Data line and transfer are good, I don&amp;#39;t know where is the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used while(1){};&amp;nbsp;line, because I want use just once SPI transfer. Later here will be sleep mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;You are starting multiple SPI transfers without waiting for the previous to complete? is that what you intended?&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No, just I want use two slave. Sinus generator (slave 1), who get 90-104 line&amp;#39;s data, and digital potentiometer (slave 2), who get 106,107 line&amp;#39;s data. Singen data lines are ok, work well, but digpot no. &lt;span&gt;I just looked at them separately.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840-DK SPI communication with digital potentiometer</title><link>https://devzone.nordicsemi.com/thread/229549?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 09:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b51bb60-dcab-4ded-b027-dfd25647bbfe</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Haven&amp;#39;t used MCP4110 myself so I cannot answer anything specific to that sensor.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        while (!spi_xfer_done)
        {
           __WFE();
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Waiting for a flag and using only __WFE could cause problems. To understand, read this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/490/how-do-you-put-the-nrf51822-chip-to-sleep/2562#2562"&gt;thread&lt;/a&gt;. I see that the SPI example in the SDK is written this way, but I think it could be changed.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        while(1){};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;so you want your app to be low power for certain time and then busy loops indefinitely (not low power anymore). I am sure this is not what you want to do!!!??&lt;/p&gt;
&lt;p&gt;You are starting multiple SPI transfers without waiting for the previous to complete? is that what you intended?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>