<?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 sampling with DMA into buffer on nrf9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55326/saadc-sampling-with-dma-into-buffer-on-nrf9160</link><description>Hi! 
 My goal is to sample an ADC channel with 10 kHz sampling rate and acquire 2000 samples in one samples acquistion and then return to lowest possible power state. This sampling will occur very intermittently, however this should not be relevant to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Dec 2019 13:21:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55326/saadc-sampling-with-dma-into-buffer-on-nrf9160" /><item><title>RE: SAADC sampling with DMA into buffer on nrf9160</title><link>https://devzone.nordicsemi.com/thread/224454?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2019 13:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6803346f-855b-48cb-85cc-fc2978e28add</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With such a high sampling rate, I think you&amp;#39;ll have to use the driver directly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could use nrfx_saadc driver directly by setting this config entry in your prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/modules/Kconfig.nordic#L157"&gt;https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/modules/Kconfig.nordic#L157&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then include nrfx_saadc.h into your application, and if you need the saadc irq handler, you can connect the interrupt directly to the handler, similar to how its done here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/nrfx_timed_signal/src/main.c#L130"&gt;https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/nrfx_timed_signal/src/main.c#L130&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>