<?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>Set up ADC nrf52832 on a continuous transformation but it does not work.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38219/set-up-adc-nrf52832-on-a-continuous-transformation-but-it-does-not-work</link><description>Hey. Here is the code: 
 The result variable does not change depending on the input voltage AIN0.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Sep 2018 05:30:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38219/set-up-adc-nrf52832-on-a-continuous-transformation-but-it-does-not-work" /><item><title>RE: Set up ADC nrf52832 on a continuous transformation but it does not work.</title><link>https://devzone.nordicsemi.com/thread/148123?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 05:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a042a9b-c518-4e25-8855-c66be5f361f5</guid><dc:creator>Alex_Golubev</dc:creator><description>&lt;p&gt;thanks.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set up ADC nrf52832 on a continuous transformation but it does not work.</title><link>https://devzone.nordicsemi.com/thread/147938?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 07:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:069e85b0-92d5-444d-86a5-1c7641834299</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;There is no way to configure a cyclic data transfer in HW like this. The SAADC peripheral will fill up RAM via DMA, but you will get an event when the buffer is filled and have to provide a new buffer and start the process again to continue sampling. (This means that you will have some problems getting an accurate time between the last sample of one series and the first sample of the next series).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set up ADC nrf52832 on a continuous transformation but it does not work.</title><link>https://devzone.nordicsemi.com/thread/147872?ContentTypeID=1</link><pubDate>Sat, 08 Sep 2018 05:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:370f9bb2-f246-497c-939a-82e7669a5b80</guid><dc:creator>Alex_Golubev</dc:creator><description>&lt;p&gt;Thanks for the answer.&lt;/p&gt;
&lt;p&gt;increased buffer size&amp;nbsp;NRF_SAADC-&amp;gt;RESULT.MAXCNT = 64;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;volatile int16_t result[64];
volatile float precise_result = 0;   

NRF_SAADC-&amp;gt;CH[0].CONFIG = (SAADC_CH_CONFIG_GAIN_Gain1_2    &amp;lt;&amp;lt; SAADC_CH_CONFIG_GAIN_Pos) |
                            (SAADC_CH_CONFIG_MODE_SE         &amp;lt;&amp;lt; SAADC_CH_CONFIG_MODE_Pos) |
                            (SAADC_CH_CONFIG_REFSEL_VDD1_4 &amp;lt;&amp;lt; SAADC_CH_CONFIG_REFSEL_Pos) |
                            (SAADC_CH_CONFIG_RESN_Bypass     &amp;lt;&amp;lt; SAADC_CH_CONFIG_RESN_Pos) |
                            (SAADC_CH_CONFIG_RESP_Bypass     &amp;lt;&amp;lt; SAADC_CH_CONFIG_RESP_Pos) |
                            (SAADC_CH_CONFIG_TACQ_40us        &amp;lt;&amp;lt; SAADC_CH_CONFIG_TACQ_Pos);
     
    NRF_SAADC-&amp;gt;CH[0].PSELP = SAADC_CH_PSELP_PSELP_AnalogInput0 &amp;lt;&amp;lt; SAADC_CH_PSELP_PSELP_Pos;
    NRF_SAADC-&amp;gt;CH[0].PSELN = SAADC_CH_PSELN_PSELN_NC &amp;lt;&amp;lt; SAADC_CH_PSELN_PSELN_Pos;
    
    NRF_SAADC-&amp;gt;RESOLUTION = SAADC_RESOLUTION_VAL_14bit &amp;lt;&amp;lt; SAADC_RESOLUTION_VAL_Pos;
    
    NRF_SAADC-&amp;gt;RESULT.MAXCNT = 64;
    NRF_SAADC-&amp;gt;RESULT.PTR = (uint32_t)&amp;amp;result;
    
      // No automatic sampling, will trigger with TASKS_SAMPLE.
    NRF_SAADC-&amp;gt;SAMPLERATE = 0x80 | SAADC_SAMPLERATE_MODE_Timers &amp;lt;&amp;lt; SAADC_SAMPLERATE_MODE_Pos;
    
    NRF_SAADC-&amp;gt;ENABLE = SAADC_ENABLE_ENABLE_Enabled &amp;lt;&amp;lt; SAADC_ENABLE_ENABLE_Pos;
    
    NRF_SAADC-&amp;gt;TASKS_CALIBRATEOFFSET = 1;
    while (NRF_SAADC-&amp;gt;EVENTS_CALIBRATEDONE == 0);
    NRF_SAADC-&amp;gt;EVENTS_CALIBRATEDONE = 0;
    while (NRF_SAADC-&amp;gt;STATUS == (SAADC_STATUS_STATUS_Busy &amp;lt;&amp;lt;SAADC_STATUS_STATUS_Pos));
    
    NRF_SAADC-&amp;gt;TASKS_START = 1;
    while (NRF_SAADC-&amp;gt;EVENTS_STARTED == 0);
    NRF_SAADC-&amp;gt;EVENTS_STARTED = 0;

    NRF_SAADC-&amp;gt;TASKS_SAMPLE = 1;
    while (NRF_SAADC-&amp;gt;EVENTS_END == 0);
    NRF_SAADC-&amp;gt;EVENTS_END = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The entire buffer&amp;nbsp; is full 16380.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8546.8.png" /&gt;&lt;/p&gt;
&lt;p&gt;How to make cyclic data transfer ADC -&amp;gt; DMA -&amp;gt; RAM?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set up ADC nrf52832 on a continuous transformation but it does not work.</title><link>https://devzone.nordicsemi.com/thread/147606?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 13:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:453c4e5a-4c58-469a-b62b-c96a24a7e3ce</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The only problem I see is that you only have room for one sample in your result buffer, so it is not surprising that you do not get different samples. Try using a large buffer, and update&amp;nbsp;NRF_SAADC-&amp;gt;RESULT.MAXCNT accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>