<?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>high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52587/high-data-rate-communication-with-spi-adc</link><description>Hello. We have product based on NRF51822 chip. 24 bit 4 channel ADC connected through SPI to MCU. Data rate is 250 Hz (4 ms). We send two ADC samples evry notification packet. In first realysation ADC was SPI slave, MCU was SPI Master. ADC generate DATA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Sep 2019 16:42:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52587/high-data-rate-communication-with-spi-adc" /><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/212123?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 16:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf99cb86-cd5b-4654-825a-b749170a1879</guid><dc:creator>Dopler</dc:creator><description>&lt;p&gt;thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/212090?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 13:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c8a6af-5f96-41f0-bdbd-6c43595bf905</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you have a long enough EasyDMA array list, you should never be blocked long enough to fill the whole set of buffers you have set aside for this.&lt;/p&gt;
&lt;p&gt;When you update the buffer pointer in the interrupt handler from an END event, there may still be an ongoing transfer that has been started (for instance by short between END and START task, or by GPIOTE/PPI from ADC interrupt), but due to the double buffering support,&amp;nbsp;the ongoing transfer will not be&amp;nbsp;discarded when updating the pointers, you will just get a later END event with information about this ongoing before the new buffers are used.&lt;/p&gt;
&lt;p&gt;According to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37731/nrf52840-spi-easydma-double-buffering/147521#147521"&gt;this post&lt;/a&gt;, the pointers are actually updated by the EasyDMA, allowing you to read it out to see how much of the available buffers have been utilized.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/211984?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 08:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34cf92de-1606-4407-b00c-6006ff5afbf2</guid><dc:creator>Dopler</dc:creator><description>&lt;p&gt;How can this be done safely?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/211981?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 08:39:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c4f6d57-f7b4-4731-88bb-185b81234fbd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Resetting the pointer will have to be done in software. There is no mechanism in hardware to reduce the buffer pointer.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/211881?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 14:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d47c5c31-ce75-48a9-b370-eafb8672767e</guid><dc:creator>Dopler</dc:creator><description>&lt;p&gt;thanks for the answer. Yes, i need external ADC. I read documentation, EasyDMA array list may help me for receive several consecutive samples. I can&amp;rsquo;t understand yet how to reset EasyDMA pointer to buffer begin? If SPIM interrupt is delayed by SoftDevice, how can I verify that the no new sample receive process started?&lt;/p&gt;
&lt;p&gt;[EDIT]In other words, is there a safe way to organize a ring buffer for a several (8 or 16) ADC samples?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: high data rate communication with SPI ADC</title><link>https://devzone.nordicsemi.com/thread/211861?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 13:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90850b95-1fe4-4be1-be65-82fc119c838d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The SAADC peripheral in nRF52 series ICs support &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=3_1_0_36_5#saadc_easydma"&gt;EasyDMA for sampling directly to RAM buffer&lt;/a&gt;. By using PPI to trigger the samples, this can be done completely without CPU intervention. The SAADC peripheral also supports double buffering, allowing you to process one buffer while sampling is done to another buffer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[EDIT]: If you are still planning to use an external ADC, the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_1#concept_svj_wt2_wr"&gt;SPIM peripheral also support EasyDMA&lt;/a&gt;. The DATA_READY pin from ADC can trigger the SPI transfer task directly using GPIOTE and PPI.&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>