<?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>nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69375/nrf52833-saadc-with-channel-scanning-settling-time</link><description>Hello Nordic Team, 
 i&amp;#39;m trying to configure the nRF52833 DK to scan through two channels at a high rate (10ksps) with the SAADC module. i have configured the time to operate at 100us and I am seeing what looks like settling time with the internal mux</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Dec 2020 12:32:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69375/nrf52833-saadc-with-channel-scanning-settling-time" /><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/285304?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 12:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa7b8d64-425f-4333-9d64-aa555d7b6973</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So I looked over your code and it&amp;#39;s mostly correct. I do have some suggestions/questions that I want you to try/answer:&lt;/p&gt;
&lt;p&gt;1.I see that you&amp;#39;re using BURST mode but&amp;nbsp;at the same time has disabled OVERSAMPLE on the channel. Could try without using the BURST mode?&lt;/p&gt;
&lt;p&gt;2.Are you able to reproduce the issue if you only use one channel?&lt;/p&gt;
&lt;p&gt;3.We have seen some issues when switching buffers in the SAADC. This can be the case if another tasks preempts the ongoing task before it&amp;#39;s able to trigger the START task in nrf_drv_saadc_buffer_convert(). The suggested solution is to use PPI to bind the START task with the END event. The bug and solution is described in more detail &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20291/offset-in-saadc-samples-with-easy-dma-and-ble/79053#79053"&gt;here&lt;/a&gt;. Could you try the suggested solution?&lt;/p&gt;
&lt;p&gt;4. Regarding the plot that you&amp;#39;ve shared. It seems that the issue happens somewhat periodically and at the same place. It&amp;#39;s difficult to tell based on the plot if this coincides with the switching of buffers. It would therefore be better if you could provide the raw data from the buffer? Maybe you could print out the raw data in the buffer and signalize when you switch buffers. That way, we could see if there is a certain pattern.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284842?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 15:26:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0745ad1e-4f2b-4907-be19-0aaf1589851c</guid><dc:creator>rmarchand</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;please see attached&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3034.main.c"&gt;devzone.nordicsemi.com/.../3034.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284840?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 15:22:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b29c701-f3ed-451b-8037-ac105b8c773a</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you upload your project? I would like to take a closer look at it.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284818?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 14:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4893ba72-744f-4793-b9ea-50c45f19f498</guid><dc:creator>rmarchand</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i&amp;#39;m not currently using the BLE and i am using the internal reference (0.6V). there are no significant load pulses to be seen in this case.&amp;nbsp; the only thing running on my program is the debug UART to print the SAADC samples.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i did change the interrupt priority and increased the size of the buffer.&amp;nbsp; what i find in this case is that if increase the buffer to say 1024 samples, i can get a few cycles of my input signal that look correct and then when the next buffer is submitted, it looks to get phase misaligned.&amp;nbsp; To me this implies that the ISR is either too long and the double buffered is not ping-ponging correctly.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not committed to using the library functions, if the only way to get this to work fast enough to demonstrate a 10ksps ADC throughput with two channels enabled that&amp;#39;s fine, but an example would be really helpful and how to use the EasyDMA correctly.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284612?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2020 17:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a4c245-4348-4bdd-9451-838e5e4ebd2c</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Two things to consider, do you have a &amp;#39;scope available? It&amp;#39;s just possible that the BLE current pulse is affecting the analogue value as seen by the ADC; easy to check the voltage on a pin with a &amp;#39;scope. Speeding up the sample rate would make that effect worse as more &amp;quot;incorrect&amp;quot; samples are taken during the voltage droop. If the reference were dropping, the pulse would be positive, so for a negative pulse as shown above the ADC pin voltage must be dropping. You could prove this issue by changing to a VDD-derived reference instead of the fixed voltage reference&amp;nbsp;&lt;em&gt;SAADC_CH_CONFIG_REFSEL_VDD1_4 &lt;/em&gt;since then the reference would track the same voltage drop and the problem should go away.&lt;/p&gt;
&lt;p&gt;The second is maybe post the handler code for both SAADC and timer, in case there is something obvious there. Regarding the priorities, you could also give the SAADC higher priority than the Timer to test your theory of exclusion.&lt;/p&gt;
&lt;p&gt;Otherwise maybe Nordic has a suggestion; I use low-level drivers and not the library code, not quite sure how the library handles the scanning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284601?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2020 16:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:282f7948-1aaa-41a4-b7a4-05bec0315fa3</guid><dc:creator>rmarchand</dc:creator><description>&lt;p&gt;Hello, and thanks for the responses.&lt;/p&gt;
&lt;p&gt;for the 40us acquisition time, I have tried this and the result stays the same.&amp;nbsp; I slowly decreases the timer period until this behaviour started to show up.&amp;nbsp; using the same code I decreased the time in 100us steps from 1ms to 500us to increase the sample rate.&amp;nbsp; my target sample rate is 10kHz for sampling two analog inputs.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;when I decrease the timer period to below 700us (~1.5ksps output) this starts to appear.&amp;nbsp; I suspect that it has to do that the timer is interrupting the ADC.&amp;nbsp; in this case i dont think the ADC is using the EasyDMA; i couldn&amp;#39;t tell from the example if it&amp;#39;s actually setting that up or not.&amp;nbsp; i would think the EasyDMA would help eliminate the issue and ping-pong the data.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I read a few posts, it doesn&amp;#39;t seem that there are any examples using the EasyDMA and the SAADC, is that right?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 SAADC with Channel Scanning Settling Time</title><link>https://devzone.nordicsemi.com/thread/284416?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 22:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2777bc9f-6ca5-40d9-9ca5-601a9d26d7b6</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;It all depends on the external impedance and input capacitance;&amp;nbsp;NRF_SAADC_ACQTIME_3US only allows 3uSec for switching channels and will introduce crosstalk between the channels if the impedance is such that the charge time is more than 5 RC time constants (for 12-bit). Options are to incease this 3uSec sample time (SAADC setting), add external capacitance to the analogue pins if the external signals are always stable, or reduce the external resistive impedance.&lt;/p&gt;
&lt;p&gt;There is always going to be some crosstalk; this can be made predictable and constant by selecting a ground channel between each signal channel - ie now scanning 4 channels - or address CR as above until the crosstalk is less than a single SAADC count.&lt;/p&gt;
&lt;p&gt;Edit: I may have misunderstood the question: if the two signals on the 2 input pins are identical then the above comments don&amp;#39;t apply - but still worth trying increasing sample time, say 40uSecs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>