<?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>ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67924/adc-sampling-rate-with-oversampling-issue</link><description>Hi, 
 I am using the nRF52840 to sample some channel. 
 I am using the nRF5SDK160098a08e2 for that and based on the saadc example. 
 
 These are the results for my tests.: 
 
 4000sps with 64 oversampling, I got sampling rate of 1370Sps, not expecting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Nov 2020 13:17:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67924/adc-sampling-rate-with-oversampling-issue" /><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/279007?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 13:17:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aa31b34-aab5-41ec-94c4-06dafd04d099</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Ok thank you for your help&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278980?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 11:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2be591b-0cfb-4f3f-84bc-1c9908f40789</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again JK,&lt;/p&gt;
[quote user="jawadk"]&lt;p&gt;the calculation isn&amp;#39;t seem right for me&lt;/p&gt;
&lt;p&gt;When I sampled in 2000Sps with 32 oversampling it succeeded !, but the calculation is (2^32)*2000 =&amp;nbsp;8589934592000 Sps. this is way bigger than 200KSps.&lt;/p&gt;
&lt;p&gt;What I am missing here !?&lt;/p&gt;[/quote]
&lt;p&gt;Please see the overview of the Oversampling register and register that I referenced you in my previous comment - there is no way for you to configure 2^32 oversampling - that would indeed be way too big, and frankly not very useful.&lt;br /&gt;Instead, you will be configuring 2^5, to achieve 32 oversampling - as detailed in the documentation.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything still should be unclear! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278949?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 09:49:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2e0b524-5ff2-41d3-8813-fef1c56392ac</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Last question:&lt;/p&gt;
&lt;p&gt;the calculation isn&amp;#39;t seem right for me&lt;/p&gt;
&lt;p&gt;When I sampled in 2000Sps with 32 oversampling it succeeded !, but the calculation is (2^32)*2000 =&amp;nbsp;8589934592000 Sps. this is way bigger than 200KSps.&lt;/p&gt;
&lt;p&gt;What I am missing here !?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your help&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278941?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 09:24:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:121d8f26-a3b1-4871-9ea2-8657c6841761</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again JK.&lt;/p&gt;
[quote user="jawadk"]The Acquisition time is&amp;nbsp;NRF_SAADC_ACQTIME_10US.[/quote]
&lt;p&gt;That explains why you saw the sampling results that you posted about originally then.&lt;br /&gt;To be able to achieve 200 kHz sampling, you will need to use the 3 US ACQTIME. With 10 Us, you can expect to see exactly the results you posted in your original ticket.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278936?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 08:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3a9075-78b3-4617-b1fd-cea680eee9b4</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;The Acquisition time is&amp;nbsp;NRF_SAADC_ACQTIME_10US.&lt;/p&gt;
&lt;p&gt;Best Reagrds&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278933?ContentTypeID=1</link><pubDate>Mon, 09 Nov 2020 08:52:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:610a52a6-94fb-4fe8-9c5a-6b62308b404f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;/p&gt;
[quote user="jawadk"]&lt;p&gt;The Samples that the ADC sample is 2^oversampling number ? and not just the oversampling numer.&lt;/p&gt;
&lt;p&gt;For example if the oversampling is 2, so the actual samples number the ADC sample is 2^2 = 4 yes ?&lt;/p&gt;[/quote]
&lt;p&gt;Yes, this is correct - you can read more about this in the SAADC peripheral documentation, specifically looking at the&amp;nbsp;&lt;em&gt;Oversampling&lt;/em&gt; section, and the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fsaadc.html&amp;amp;anchor=register.OVERSAMPLE"&gt;Oversampling register&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Did you check which Acquisition time you used during your testing?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278889?ContentTypeID=1</link><pubDate>Sun, 08 Nov 2020 08:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90b09f6e-ce8e-4daa-b63f-8719f6506f4c</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The Samples that the ADC sample is 2^oversampling number ? and not just the oversampling numer.&lt;/p&gt;
&lt;p&gt;For example if the oversampling is 2, so the actual samples number the ADC sample is 2^2 = 4 yes ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC sampling rate with oversampling issue</title><link>https://devzone.nordicsemi.com/thread/278265?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 12:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27c15210-e0fb-4510-a1c3-b9145e58c5ae</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello JK,&lt;/p&gt;
[quote user=""]I am using the&amp;nbsp;nRF5SDK160098a08e2 for that and based on the saadc example.[/quote]
&lt;p&gt;What changes did you make to the example? Did you modify the channel / SAADC configurations? - if so, how have you modified them?&lt;br /&gt;&lt;br /&gt;The SAADC example uses the default SAADC and channel configurations for Single ended inputs - which is configured to 10 µs Acquisition time. Did you change this?&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>