<?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 Burst oversampling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54314/saadc-burst-oversampling</link><description>Hi. 
 I have issue measure ADC value from battery. 
 setup is NRF52832, SDK 15.3.0, S332, using ANT+, BLE, GPIOTE, PPI, RTC, APPTIMER, LOW_PWM 
 my goal is measure periodically voltage using saadc. 
 process is timer interrupt --- ppi --- saadc. 
 I got</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Nov 2019 01:15:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54314/saadc-burst-oversampling" /><item><title>RE: SAADC Burst oversampling</title><link>https://devzone.nordicsemi.com/thread/220447?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 01:15:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9d9306-aa7d-489d-aec9-dc8d0cc98a37</guid><dc:creator>BEN_HB</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: SAADC Burst oversampling</title><link>https://devzone.nordicsemi.com/thread/220280?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2019 11:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c2082bb-678d-4fcd-9bc9-d00ac04a79fa</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. Then this may be related to &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_86.html"&gt;erratum 86&lt;/a&gt;. You can employ the workaround or simply ignore the first sample after calibration. Note that there is no need to calibrate frequently. The SAADC has a temperature-dependent offset, but the temperature does not change significantly you can ignore this. Alternatively, you can calibrate only if the temperature has changed significantly, or by other methods.&lt;/p&gt;
&lt;p&gt;1. We do not have official numbers on that. Essentially you should always calibrate at least once.&lt;/p&gt;
&lt;p&gt;2. Yes, the calibration value is still valid, since this does not reset the peripheral itself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. I was not clear. Setting the value to 8 gives you 256 (2^8), but if you are referring to the numbers used in the define names in nrfx, then 8x is mapped to 3, which is 8 (2^3=8). Similarly, 256x is mapped to 8, which is 2^8=256. This is the highest possible value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Burst oversampling</title><link>https://devzone.nordicsemi.com/thread/219978?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2019 07:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87d72727-529e-4c7c-b723-68bc165ca12b</guid><dc:creator>BEN_HB</dc:creator><description>&lt;p&gt;yes right.&lt;/p&gt;
&lt;p&gt;but in my code, first trigger and second trigger sample task is not result normally.&lt;/p&gt;
&lt;p&gt;I found the cause.&lt;/p&gt;
&lt;p&gt;If I remove calibration func, my issue is not happened.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;executed calibration before trigger sample.&lt;/p&gt;
&lt;p&gt;1. If calibration is not excute, How much adc value is error depend on temperature? max and min&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. if after calibration, saadc uninit and re saadc init, the calibration offset value is still remain?&lt;/p&gt;
&lt;p&gt;after calibration, I try saadc uninit and one more init saadc, the issue is disppear.&lt;/p&gt;
&lt;p&gt;3. if select 256x, is it right 2^256???.&amp;nbsp; it too huge number. It take so long time.&lt;/p&gt;
&lt;p&gt;thanks you,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Burst oversampling</title><link>https://devzone.nordicsemi.com/thread/219903?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 13:41:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff52e5e7-680b-400c-881c-e07103e4b29d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1. I saw document and if set oversampling is 8x means that sampled as fast as 2^8 and averaged the values? is it right?[/quote]
&lt;p&gt;Yes. Oversampling 8x means 2^8=256. And since you also use burst you just need to trigger the SAMPLE task once for each oversampled sample, instead of once for every raw sample.&lt;/p&gt;
[quote user=""]2. 8x oversampling value&amp;nbsp; is average of 256 sampled value?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;after first&amp;nbsp;nrf_drv_saadc_sample_task_get() ,&amp;nbsp;NRF_DRV_SAADC_EVT_DONE is not triggerd.&lt;/p&gt;
&lt;p&gt;after second&amp;nbsp;&lt;span&gt;nrf_drv_saadc_sample_task_get(),&amp;nbsp;&amp;nbsp;NRF_DRV_SAADC_EVT_DONE&amp;nbsp;is triggered but value is strange. always minus value. number is random.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do not immediately spot a problem. But I also dont understand the comment. Calling nrf_drv_saadc_sample_task_get() multiple times should not be relevant. Do you mean&amp;nbsp;nrf_drv_saadc_buffer_convert()?&lt;/p&gt;
&lt;p&gt;In any case, you should just need to trigger the SAMPLE task once, this is the basic difference between using burst mode and not. (if using burst mode, trigger SAMPLE task once, and oversampling happens automatically. If not, trigger SAMPLE every time for as many times as you have configured oversampling.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>