<?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>A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33785/a-plurality-of-a-d-conversion-processing</link><description>How can I perform multiple A / D conversion?
I created a program with reference to the method of the old version of A / D conversion, but the function name and argument used are different and it does not work.
Please tell me how to do with &amp;quot;nRF5_SDK_15</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Apr 2018 08:51:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33785/a-plurality-of-a-d-conversion-processing" /><item><title>RE: A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/thread/129896?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 08:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:502f6916-2f86-472e-89ef-f05ad5420dae</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;No problem :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/thread/129894?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 08:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c8abc42-2203-4528-a243-9b0f410d2785</guid><dc:creator>yokokawa</dc:creator><description>&lt;pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;Errors no longer occur.
Thank you very much.&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/thread/129869?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 07:21:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72645e11-1209-4be0-b862-e0247de01d9c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*-&amp;lt;ADC offset calibration &amp;gt;-*/
    err_code = nrfx_saadc_calibrate_offset();
    APP_ERROR_CHECK(err_code);
    
    while(nrfx_saadc_is_busy()) // Wait for calibration to complete
    {
        __WFE();    //
        __SEV();    //
        __WFE();    // This sequence puts the system to sleep (SystemON) while waiting
    }

/*-&amp;lt; SAADC Channel Setting &amp;gt;-*/ 
    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel0_config);    /* Channel 0 */
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/thread/129860?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 05:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:235e61c5-024e-4a4b-bc7d-b7f38ec328db</guid><dc:creator>yokokawa</dc:creator><description>&lt;pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;I created the following program, but when I execute &amp;quot;nrfx_saadc_calibrate_offset ()&amp;quot;, &lt;br /&gt;I get an error with &amp;quot;nrf_drv_saadc_channel_init ()&amp;quot;.
Please tell me what processing is missing.&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;---------------------------------------------&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;void saadc_init(void)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; ret_code_t err_code;&lt;/p&gt;
&lt;p&gt;/*-&amp;lt; SAADC Register initial parameter &amp;gt;-*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; nrf_drv_saadc_config_t saadc_config = NRF_DRV_SAADC_DEFAULT_CONFIG;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/*-&amp;lt; SAADC Channel Setting parameter &amp;gt;-*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; nrf_saadc_channel_config_t channel0_config =&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);&amp;nbsp; &amp;nbsp; /* Channel 0 data */&lt;br /&gt;&amp;nbsp; &amp;nbsp; nrf_saadc_channel_config_t channel1_config =&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);&amp;nbsp; &amp;nbsp; /* Channel 1 data */&lt;/p&gt;
&lt;p&gt;/*-&amp;lt; SAADC initial &amp;gt;-*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrf_drv_saadc_init(&amp;amp;saadc_config, saadc_callback); &lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;/*-&amp;lt;ADC offset calibration &amp;gt;-*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrfx_saadc_calibrate_offset();&lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;/*-&amp;lt; SAADC Channel Setting &amp;gt;-*/ &lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel0_config);&amp;nbsp; &amp;nbsp; /* Channel 0 */&lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrf_drv_saadc_channel_init(1, &amp;amp;channel1_config);&amp;nbsp; &amp;nbsp; /* Channel 1 */&lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;/*-&amp;lt;SAADC double baffer Setting &amp;gt;-*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAADC_SAMPLES_IN_BUFFER);&amp;nbsp; &amp;nbsp; /* 1st buffer&amp;nbsp; */&lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;br /&gt;&amp;nbsp; &amp;nbsp; err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAADC_SAMPLES_IN_BUFFER);&amp;nbsp; &amp;nbsp; /* 2nd buffer */&lt;br /&gt;&amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;pre class="tw-data-text tw-ta tw-text-small" dir="ltr"&gt;&lt;span lang="en"&gt;---------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;Thanking you in advance.&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-ta tw-text-small" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A plurality of A / D conversion processing</title><link>https://devzone.nordicsemi.com/thread/129742?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 11:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbf8ed75-7cb4-466d-8ef1-96bf3162cd16</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Yokokawa-san,&lt;/p&gt;
&lt;p&gt;You need to use the&amp;nbsp;&lt;a title="SAADC driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrfx__saadc.html?cp=4_0_0_6_9_0_17_1"&gt;SAADC driver&lt;/a&gt;&amp;nbsp;API documentation. I also suggest that you compare the SAADC example of SDK15 with your old implementation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The programming flow when using multiple ADC channels is as follows:&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Initialize the SAADC driver with a call to&amp;nbsp;&lt;a title="nrfx_saadc_init" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrfx__saadc.html?cp=4_0_0_6_9_0_17_1_17#gaea61b5b166bda57cf9daa1d11617f92d"&gt;nrfx_saadc_init&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;Calibrate the offset with a call to&amp;nbsp;&lt;a title="nrfx_saadc_calibrate_offset" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrfx__saadc.html?cp=4_0_0_6_9_0_17_1_14#gabebf4b2245bff5bc767b0e679702708d"&gt;nrfx_saadc_calibrate_offset&lt;/a&gt;. You need to wait for&amp;nbsp;the SAADCs DONE event before you can proceed.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Initialize the SAADC channels you want to use with calls to&amp;nbsp;&lt;a title="nrfx_saadc_channel_init" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrfx__saadc.html?cp=4_0_0_6_9_0_17_1_15#gab74892a83a2f842436fac5f1462eca6a"&gt;nrfx_saadc_channel_init&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The SAADC will now sample all enabled channels sequentially when a SAMPLE task is triggered.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>