<?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 samples missing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85479/saadc-samples-missing</link><description>Hi, 
 
 I&amp;#39;m implementing a hard real-time system (few us jitter) on nRF52840, SDK17.1, based on FreeRTOS project. 
 In the project, I need to sync GPIOs toggling with ADC sampling. There is heavy EGU-Timers-PPI-GPIOTE/SAADC work done (see attached picture</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Mar 2022 14:24:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85479/saadc-samples-missing" /><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/358904?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 14:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a569579-d5c1-448b-a676-c0ced1d688ea</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you tried recreating the problem with a simpler code? If you are not able to reproduce the errata with a simple code (i.e. enabling the first channels, sample, change enable the other channels, sample, and so on), it would be hard to recreate the problem on our end. It would then be hard to link it to the same errata, or prove that the errata conditions are wider. With such a complex procedure/code as you describe, there may be other sources of error that can cause issues, which we can&amp;#39;t simply recreate on our end.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356995?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 21:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c86f8cce-80fc-4736-a35a-881ab50bb0a6</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/joh2"&gt;Jørgen Holmefjord&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The code is quite extensive, I&amp;#39;ll try to summarize it -&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is a freertos application with some hard real time requirement.&lt;/p&gt;
&lt;p&gt;There are two modules involved: Analog.c &amp;amp; Sequencer.c - Analog.c constantly sample Ain0-Ain3 @ 1KHz, 10us acq time, driven by T2 &amp;amp; PPI.. Each sample is send to freertos algo task queue.&lt;/p&gt;
&lt;p&gt;The algo runs in task context. Once it decides a GPIOTE sequence&amp;nbsp; is requested it signals the sequencer task.&lt;/p&gt;
&lt;p&gt;The sequencer task:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;uninits the current saadc (that was controlled in the analog module)&lt;/li&gt;
&lt;li&gt;requesters 1150us timeslot from SD&lt;br /&gt;&lt;br /&gt;Now sequencer task is blocked and the rest is happening in realtime (PPIs &amp;amp; ISR)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;A radio callback is fired with&amp;nbsp; NRF_RADIO_CALLBACK_SIGNAL_TYPE_START signal&lt;/li&gt;
&lt;li&gt;In the callback EGU1.1 is triggered. It was previously tied to T4 &amp;amp; T3 start tasks hence timers begin to run synchronously.&lt;/li&gt;
&lt;li&gt;T4CC0 generates interrupts, al other T4CCRs (T4CCR1-5, ) are tied to toggling GPIOTE and T3CC1 is tied to SAADC_START&lt;/li&gt;
&lt;li&gt;On the first &amp;#39;state&amp;#39; interrupt @100us, I initialize the saadc (AIN4-7, 10usacq time)&lt;/li&gt;
&lt;li&gt;T4CC0 intr is used as a state machine arbiter. On each T4CC0 interrupt, the other CC registers are modified as needed (according to the current state) to generate the sequence.&lt;/li&gt;
&lt;li&gt;Note that SAADC_START is triggered 4 times in the sequence (@200,400,600,850us) total of 16 samples need to be stored in the buffer&lt;/li&gt;
&lt;li&gt;On the last intr (@950us) I inspect guard variables, EGU flags and/or SAADC.AMOUNT register.
&lt;ol&gt;
&lt;li&gt;If I find mismatch (EGU Flag tied to SAADC_END not set or AMOUNT != 0x10 or guard variable counting saadc_handler() invocations) I breakpoint and inspect.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;If everything is OKI stop T3, T4, saadc_unint() and restarts saadc_init() with the analog module&amp;#39;s and reenable the PPI&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This way the saadc repeatedly : saadc_init() - samples several (of several hndereds) of samples - saadc_uninit() and the switch &amp;#39;owner&amp;#39; to the other module.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now, occasionally branch to step 9a and brealpoint, Inspecting the EGU flags, AMOIUNt register and the variables or show that though 4 START tasks were triggered (=16 samples), no END task triggered. AMOUNT register display a relatively small number when this happens 0/1/2 instead of 0x10.&lt;/p&gt;
&lt;p&gt;The problem was resolved only when I added errata 212 workaround code right before the saadc_init()&amp;nbsp; command in both modules&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I Hope this helps to recreate the problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356702?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 17:02:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ece7ef-22d3-4416-8752-c9946ee7644c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have a minimal code example without BURST enabled, and T_acq &amp;gt;=&lt;span&gt;&amp;nbsp;10 μs that will trigger errata 212?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356452?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 23:07:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cfe73b7-cda8-4212-bb71-4dbf5e4a1bbf</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Hey &lt;a href="https://devzone.nordicsemi.com/members/qwertynoon"&gt;qwertynoon&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In reality,&amp;nbsp; the sequence shown above is only part of the full EGU--Timers-PPI-Saadc sequences that are going on.&lt;/p&gt;
&lt;p&gt;In practice, AIN0-3 are being sampled @ 1KHz with PPI channel T2CC0 -&amp;gt;SAADC_SAMPLE&lt;/p&gt;
&lt;p&gt;The sampled data is fed into an algorithm that decides when to generate the burst mentioned above.&lt;/p&gt;
&lt;p&gt;When its time to generate the burst, saad is being uninitialized and reinitialized with AIN4-7 as input.&lt;/p&gt;
&lt;p&gt;Then the software requests a ~1200us timeslot from the SD, once its&amp;nbsp; granted T3 &amp;amp; T4 are triggered bu EGU and the aforementioned sequence begins.&lt;/p&gt;
&lt;p&gt;This sequence of sequences goes no and on.&lt;/p&gt;
&lt;p&gt;This is depicted in the attached image.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;UPDATE -&lt;/p&gt;
&lt;p&gt;I followed &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_212.html"&gt;errata 212&lt;/a&gt; workaround each time saadc_init() runs (before saadc_channel_init()) and it seems to overcome the problem above (at least at first glance). I will keep testing and will update if I find something new.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;@Nordic_engineers@ - I suspect that errata 212 appears in a broader set of conditions than described in the errata sheet. As described above, I experienced the problem when switching from one set of channels to another set of channels back and forth. All channels were 10us (for testing), and BURST was off.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/2022_2D00_03_2D00_07-00_5F00_46_5F00_49_2D00_Window.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356443?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 07:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0173767-68f5-4f2d-92e7-b5230970f04d</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;It is hard to analise without code &lt;/p&gt;
&lt;p&gt;So look at this reference.&lt;/p&gt;
&lt;p&gt;Don`t forget to set SAADC and TIMER proirity to 0&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */

#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;nrfx_saadc.h&amp;gt;
#include &amp;quot;nrfx_timer.h&amp;quot;
#include &amp;quot;nrfx_ppi.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#include &amp;quot;nrf_uart.h&amp;quot;
#include &amp;quot;app_uart.h&amp;quot;


#define ADC_CHANNELS_IN_USE     6   // Note: If changed, the logging during the NRFX_SAADC_EVT_DONE must be updated.
#define SAADC_BUF_SIZE          ADC_CHANNELS_IN_USE
#define SAADC_BUF_COUNT         2000
#define SAADC_SAMPLE_FREQUENCY  10000

static nrf_saadc_value_t samples1[SAADC_BUF_COUNT][SAADC_BUF_SIZE];
static nrf_saadc_value_t samples2[SAADC_BUF_COUNT][SAADC_BUF_SIZE];
static const nrfx_timer_t m_sample_timer = NRFX_TIMER_INSTANCE(1);
static nrf_ppi_channel_t m_timer_saadc_ppi_channel;
static nrf_ppi_channel_t m_saadc_internal_ppi_channel;
static const uint32_t saadc_sampling_rate = 1000; // milliseconds (ms)
static uint32_t buffer_index;
static uint32_t buf_select = 0;
static const nrf_saadc_input_t ANALOG_INPUT_MAP[NRF_SAADC_CHANNEL_COUNT] = {
    NRF_SAADC_INPUT_AIN0, NRF_SAADC_INPUT_AIN1, NRF_SAADC_INPUT_AIN2, NRF_SAADC_INPUT_AIN3,
    NRF_SAADC_INPUT_AIN4, NRF_SAADC_INPUT_AIN5, NRF_SAADC_INPUT_AIN6, NRF_SAADC_INPUT_AIN7};


// Simple function to provide an index to the next input buffer
// Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2
static uint32_t next_free_buf_index(void)
{
    //buffer_index = -1;
    buffer_index = (buffer_index + 1) % SAADC_BUF_COUNT;
    //NRF_LOG_INFO(&amp;quot;buffer_index: %d&amp;quot;,buffer_index);
    return buffer_index;
}
 

static void timer_handler(nrf_timer_event_t event_type, void * p_context)
{
}

bool alarm = false;

static void event_handler(nrfx_saadc_evt_t const * p_event)
{
    ret_code_t err_code;
    switch (p_event-&amp;gt;type)
    {
        case NRFX_SAADC_EVT_DONE:
        NRF_LOG_INFO(&amp;quot;ALARM!!! %d&amp;quot;);
            break;

        case NRFX_SAADC_EVT_BUF_REQ:
            // Set up the next available buffer
            if(buf_select == 0)
            {
                err_code = nrfx_saadc_buffer_set(&amp;amp;samples1[next_free_buf_index()][0], SAADC_BUF_SIZE);
                
            }
            else
            {
                err_code = nrfx_saadc_buffer_set(&amp;amp;samples2[next_free_buf_index()][0], SAADC_BUF_SIZE);

            }
            APP_ERROR_CHECK(err_code);
            break;
                default:
            NRF_LOG_INFO(&amp;quot;SAADC evt %d&amp;quot;, p_event-&amp;gt;type);
            break;
    }
}


static void timer_init(void)
{
    nrfx_err_t err_code;

    nrfx_timer_config_t timer_config = NRFX_TIMER_DEFAULT_CONFIG;
    timer_config.frequency = NRF_TIMER_FREQ_31250Hz;
    err_code = nrfx_timer_init(&amp;amp;m_sample_timer, &amp;amp;timer_config, timer_handler);
    APP_ERROR_CHECK(err_code);
    nrfx_timer_extended_compare(&amp;amp;m_sample_timer,
                                NRF_TIMER_CC_CHANNEL0,
                                nrfx_timer_ms_to_ticks(&amp;amp;m_sample_timer, saadc_sampling_rate),
                                NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK,
                                false);

    nrfx_timer_resume(&amp;amp;m_sample_timer);
}



static void ppi_init(void)
{
    // Trigger task sample from timer
    nrfx_err_t err_code = nrfx_ppi_channel_alloc(&amp;amp;m_timer_saadc_ppi_channel);
    APP_ERROR_CHECK(err_code);
    err_code = nrfx_ppi_channel_assign(m_timer_saadc_ppi_channel, 
                                       nrfx_timer_event_address_get(&amp;amp;m_sample_timer, NRF_TIMER_EVENT_COMPARE0),
                                       nrf_saadc_task_address_get(NRF_SAADC_TASK_SAMPLE));
    APP_ERROR_CHECK(err_code);

    err_code = nrfx_ppi_channel_enable(m_timer_saadc_ppi_channel);
    APP_ERROR_CHECK(err_code);
}


static void adc_configure(void)
{
    ret_code_t err_code;

    nrfx_saadc_adv_config_t saadc_adv_config = NRFX_SAADC_DEFAULT_ADV_CONFIG;
    saadc_adv_config.internal_timer_cc = 0;
    saadc_adv_config.start_on_end = true;

    err_code = nrfx_saadc_init(NRFX_SAADC_CONFIG_IRQ_PRIORITY);
    APP_ERROR_CHECK(err_code);

    static nrfx_saadc_channel_t channel_configs[ADC_CHANNELS_IN_USE];

    uint8_t channel_mask = 0;
    for(int i = 0; i &amp;lt; ADC_CHANNELS_IN_USE; i++) {
        nrf_saadc_input_t pin = ANALOG_INPUT_MAP[i];
        // Apply default config to each channel
        nrfx_saadc_channel_t config = NRFX_SAADC_DEFAULT_CHANNEL_SE(pin, i);

        // Replace some parameters in default config
        config.channel_config.reference = NRF_SAADC_REFERENCE_INTERNAL;          
        config.channel_config.gain = NRF_SAADC_GAIN1;
        config.channel_config.acq_time   = NRF_SAADC_ACQTIME_40US,

        // Copy to list of channel configs
        memcpy(&amp;amp;channel_configs[i], &amp;amp;config, sizeof(config));

        // Update channel mask
        channel_mask |= 1 &amp;lt;&amp;lt; i;
    }

    err_code = nrfx_saadc_channels_config(channel_configs, ADC_CHANNELS_IN_USE);
    APP_ERROR_CHECK(err_code);

    err_code = nrfx_saadc_advanced_mode_set(channel_mask,
                                            NRF_SAADC_RESOLUTION_14BIT,
                                            &amp;amp;saadc_adv_config,
                                            event_handler);
    APP_ERROR_CHECK(err_code);
                                            
    // Configure two buffers to ensure double buffering of samples, to avoid data loss when the sampling frequency is high
    err_code = nrfx_saadc_buffer_set(&amp;amp;samples1[next_free_buf_index()][0], SAADC_BUF_SIZE);
    APP_ERROR_CHECK(err_code);

    err_code = nrfx_saadc_buffer_set(&amp;amp;samples2[next_free_buf_index()][0], SAADC_BUF_SIZE);
    APP_ERROR_CHECK(err_code);

    err_code = nrfx_saadc_mode_trigger();
    APP_ERROR_CHECK(err_code);
}

void uart_event_handle(app_uart_evt_t * p_event)
{}

static void uart_init(void)
{
    uint32_t                     err_code;
    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = 31,
        .tx_pin_no    = 32,
        .rts_pin_no   = 6,
        .cts_pin_no   = 8,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
        .baud_rate    = NRF_UART_BAUDRATE_460800//NRF_UART_BAUDRATE_1000000
    };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                       255,
                       255,
                       uart_event_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);
    APP_ERROR_CHECK(err_code);
}

int main(void)
{
    ret_code_t err_code = 1;

    // Configure Logging. LOGGING is used to show the SAADC sampled result.
    err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);                       
    NRF_LOG_DEFAULT_BACKENDS_INIT();
    NRF_LOG_INFO(&amp;quot;nrfx_saadc_api2 simple SAADC Continuous Sampling Example using timer and PPI.&amp;quot;);	
    while(NRF_LOG_PROCESS() != NRF_SUCCESS);
    adc_configure();
    ppi_init();
    timer_init();
    uart_init();
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356442?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 07:33:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81f8e4f8-611d-4430-bfa9-38cb5cda4618</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;I tried 3us on all channels and tried to extend 950--&amp;gt;1150us.&lt;/p&gt;
&lt;p&gt;Problem still occurs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356441?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 06:55:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46808a94-91d0-4887-b56b-f15961309c18</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Set to 3us and try. Or you have to set a longer period&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356439?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 06:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40e6aad6-1465-4c37-b724-f84e01f51bac</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;I&amp;#39;ve set chan0 (ain4) to 20us and Chan 1-3 (ain5-7) to 3us (also tried 10us per errata212)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC samples missing</title><link>https://devzone.nordicsemi.com/thread/356438?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2022 06:35:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d551154f-cb2f-41f3-a8c7-8d399f7fff01</guid><dc:creator>qwertynoon</dc:creator><description>&lt;p&gt;Hi Eyalasko&lt;/p&gt;
&lt;p&gt;What Acquisition time did you set?&lt;/p&gt;
&lt;p&gt;I made a FW with 8 channels &amp;amp; 220us period scan and it works well&lt;/p&gt;
&lt;p&gt;But I set minimal Acquisition time&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Bits 18..16 : Acquisition time, the time the SAADC uses to sample the input voltage */
#define SAADC_CH_CONFIG_TACQ_Pos (16UL) /*!&amp;lt; Position of TACQ field. */
#define SAADC_CH_CONFIG_TACQ_Msk (0x7UL &amp;lt;&amp;lt; SAADC_CH_CONFIG_TACQ_Pos) /*!&amp;lt; Bit mask of TACQ field. */
#define SAADC_CH_CONFIG_TACQ_3us (0UL) /*!&amp;lt; 3 us */
#define SAADC_CH_CONFIG_TACQ_5us (1UL) /*!&amp;lt; 5 us */
#define SAADC_CH_CONFIG_TACQ_10us (2UL) /*!&amp;lt; 10 us */
#define SAADC_CH_CONFIG_TACQ_15us (3UL) /*!&amp;lt; 15 us */
#define SAADC_CH_CONFIG_TACQ_20us (4UL) /*!&amp;lt; 20 us */
#define SAADC_CH_CONFIG_TACQ_40us (5UL) /*!&amp;lt; 40 us */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>