<?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>SAADC oversampling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53683/saadc-oversampling</link><description>I have SAADC configured in burst mode with 4x oversampling and tACQ=5uSec. 
 What is the total conversion period? 
 tACQ + tCONV*4 or (tACQ+tCONV)*4 
 In other words, is Sample and Hold performed only once or once for each conversion within the burst</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Oct 2019 14:49:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53683/saadc-oversampling" /><item><title>RE: SAADC oversampling</title><link>https://devzone.nordicsemi.com/thread/217151?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2019 14:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ea257e3-7438-4fd0-b2af-0fa4e2a1858d</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The last alternative would be the correct one, as the sample will be performed for each conversion. This can be tested by using a PPI to sets up a task that toggles a pin each time a conversion is done. The image shows that the pin is toggled 16 times when an oversample of x16 is used.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;
&lt;p&gt;&lt;img height="51" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0aa3dfab884a43c2afc251002b6eab91/pastedimage1572274125465v1.jpeg" width="563" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
    static int16_t buffer[2];
    static uint32_t event_count = 0;
 
    NRF_SAADC-&amp;gt;ENABLE = 1;
    NRF_SAADC-&amp;gt;OVERSAMPLE = 4;
    NRF_SAADC-&amp;gt;RESULT.PTR = (uint32_t) buffer;
 
    NRF_SAADC-&amp;gt;CH[0].PSELN = 0x0;
    NRF_SAADC-&amp;gt;CH[0].CONFIG = 0x01020000; // 10us, Burst mode.
 
    NRF_SAADC-&amp;gt;CH[0].PSELP = 0x1; // Sample 2 channels.
    NRF_SAADC-&amp;gt;RESULT.MAXCNT = 1;
    NRF_SAADC-&amp;gt;EVENTS_END = 0;
    NRF_SAADC-&amp;gt;EVENTS_CALIBRATEDONE = 0;
    NRF_SAADC-&amp;gt;EVENTS_DONE = 0;

 

    #define PPI_CHANNEL (0)
    #define PIN_GPIO    (27)

 

    // Configure PIN_GPIO as output
    NRF_GPIO-&amp;gt;DIRSET = (1UL &amp;lt;&amp;lt; PIN_GPIO);

 

    // Configure GPIOTE-&amp;gt;TASKS_OUT[0] to toggle PIN_GPIO
    NRF_GPIOTE-&amp;gt;CONFIG[0] = (GPIOTE_CONFIG_MODE_Task       &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos) |
                            (GPIOTE_CONFIG_OUTINIT_Low     &amp;lt;&amp;lt; GPIOTE_CONFIG_OUTINIT_Pos) |
                            (GPIOTE_CONFIG_POLARITY_Toggle &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos) |
                            (PIN_GPIO                      &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos);

 

    // Configure PPI channel with connection between TIMER-&amp;gt;EVENTS_COMPARE[0] and GPIOTE-&amp;gt;TASKS_OUT[0]
    NRF_PPI-&amp;gt;CH[PPI_CHANNEL].EEP = (uint32_t)&amp;amp;NRF_SAADC-&amp;gt;EVENTS_DONE;
    NRF_PPI-&amp;gt;CH[PPI_CHANNEL].TEP = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[0];

 

    // Enable PPI channel
  NRF_PPI-&amp;gt;CHENSET = (1UL &amp;lt;&amp;lt; PPI_CHANNEL);
 
    while(1){
 
        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;
 
        event_count++;
        nrf_delay_ms(100);
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>