<?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>Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25004/can-i-get-data-from-an-external-adc-without-using-cpu-time</link><description>Hello, 
 I would like to make use of an external ADC that is connected to my nRF52832 through SPI &amp;amp; easyDMA,minimizing the use of the CPU (or without using the CPU). 
 The sampling frequency, when nRF52832 will request a sample to the ADC, is 25KHz</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Sep 2017 09:29:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25004/can-i-get-data-from-an-external-adc-without-using-cpu-time" /><item><title>RE: Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/thread/98484?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 09:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4daa7495-a499-49e2-94d0-f8e23c33ab8e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;My bad. I was thinking about doing everything using the SPI registers directly. Anyway, you should look into the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/group__nrf__drv__spi.html#ga5b2232cdf8153d5d2b83f25de45929f1"&gt;nrf_drv_spi_xfer()&lt;/a&gt; function. It allows you to schedule and start multiple transfers by using PPI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/thread/98483?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2017 06:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d2738c-907c-4af6-8ce4-08e9ac6e3bc3</guid><dc:creator>ndarkness</dc:creator><description>&lt;p&gt;@Martin Børs-Lind, I don&amp;#39;t fully understand what you mean. If I do use the SPI function &lt;code&gt;nrf_drv_spi_transfer(&amp;amp;spiInstance, txData, bytesNumberTx, rxData, bytesNumberRx);&lt;/code&gt; the pointer to the buffer &lt;code&gt;rxData&lt;/code&gt; will be always used as the position to store a SPI transfer, meaning that I previous samples on that buffer will be lost right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/thread/98481?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 17:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e130db5-85dc-4f19-88c2-bdfaad30758e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The EasyDMA feature will never reset the buffer address itself. It will just continue to increment the pointer to the buffer forever and you will have to control this in your software to avoid buffer overflows. So in other words, you are the one responsible for resetting the buffer start address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/thread/98482?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 14:14:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f19b800-ea98-48b2-a765-7b4c5d72ece1</guid><dc:creator>ndarkness</dc:creator><description>&lt;p&gt;@TurboJ , thanks for your reply. Are you aware if using &lt;code&gt;SPIMx-&amp;gt;TASKS_START&lt;/code&gt; will restart my buffer position to the inital value?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I get data from an external ADC without using CPU time?</title><link>https://devzone.nordicsemi.com/thread/98480?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 14:00:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1302612d-e2da-406d-8fd9-e632e6ecf59b</guid><dc:creator>Turbo J</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;I see an possible issue with PPI memory buffer in that the memory pointer is not incremented each time I read a sample which would lead to lose the previous samples.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This could be somewhat migitated by the list feature in EasyDMA.&lt;/p&gt;
&lt;p&gt;If your ADC has a &amp;quot;data ready&amp;quot; pin, you can try using GPIOTE and PPI to trigger the &lt;code&gt;SPIMx-&amp;gt;TASKS_START&lt;/code&gt; on each sample.&lt;/p&gt;
&lt;p&gt;Note that keeping track of the sample count may need additional ressources (e.g. Timer+ PPI channel).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>