<?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>zephyr ADC 8K</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68406/zephyr-adc-8k</link><description>Hello 
 
 I would like to use SAADC 2 channels sample at 8K samples \ per second for each channel 
 based on: 
 https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/drivers/adc/adc_api/src/test_adc.c 
 
 I tried to define ADC readings with callback</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Mar 2021 11:16:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68406/zephyr-adc-8k" /><item><title>RE: zephyr ADC 8K</title><link>https://devzone.nordicsemi.com/thread/296814?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 11:16:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27f5c82f-9311-4cba-b15f-aee3105ce2ae</guid><dc:creator>kamacode</dc:creator><description>&lt;p&gt;working very well, issue closed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: zephyr ADC 8K</title><link>https://devzone.nordicsemi.com/thread/280287?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 09:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e82e971e-7568-43d0-aca1-7ab0461f1616</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I suggest you use the nrfx saadc driver directly:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;nrfx_saadc.h&amp;gt;

void main(void)
{
	/* Connect SAADC IRQ to nrfx_twim_3_irq_handler */
	IRQ_CONNECT(DT_IRQN(DT_NODELABEL(adc)),
		    DT_IRQ(DT_NODELABEL(adc), priority),
		    nrfx_isr, nrfx_saadc_irq_handler, 0);

	/* Initialize driver */

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Add&amp;nbsp;&lt;span&gt;CONFIG_NRFX_SAADC&lt;/span&gt;&lt;span&gt;=y to prj.conf.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;See&amp;nbsp;&lt;a title="SAADC driver" href="https://infocenter.nordicsemi.com/topic/drivers_nrfx_v2.4.0/group__nrfx__saadc.html?cp=8_0_3_0_36_0"&gt;SAADC driver&lt;/a&gt;&amp;nbsp;and &lt;a title="SAADC HAL" href="https://infocenter.nordicsemi.com/topic/drivers_nrfx_v2.4.0/group__nrf__saadc__hal.html?cp=8_0_3_0_36_1"&gt;SAADC HAL&lt;/a&gt;&amp;nbsp;APIs on use.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You&amp;#39;ll also need to set up a source to trigger the SAADC&amp;#39;s sample task. At 16ksps you can use an RTC unless you need higher precision of the sample rate, in that case you use a TIMER.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you familiar with the nRF5 SDK? Specifically PPI and how to connect events to tasks?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>