<?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>Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s</link><description>Hello, I&amp;#180;m working on my audio project and I try to stream some audio data (currently a 1 kHz square wave signal with 3.3 V peak) over I2S. The audio signal is sampled by an ADC in the free-running mode. 
 
 The code from above will give a pretty poor</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Dec 2021 21:26:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s" /><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/344213?ContentTypeID=1</link><pubDate>Fri, 17 Dec 2021 21:26:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:045735f4-1a29-47ee-8126-008a485eb861</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;thank you for the answer&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Everything is clear now and my project works as expected. I will close the ticket and wish you a great holiday and some relaxing Christmas days.&lt;br /&gt;&lt;br /&gt;Best wishes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/344212?ContentTypeID=1</link><pubDate>Fri, 17 Dec 2021 20:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89ea6705-f4df-4338-80d3-6531e7201e06</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Daniel&lt;br /&gt;&lt;br /&gt;Thank you for your continued patience with this.&lt;br /&gt;&lt;br /&gt;I have taken a look at the behavior you described, and concluded that it is likely caused by the &amp;#39;m_zero_samples_to_ignore&amp;#39; parameter of the unmodified I2S example, which comes into play at the beginning of every transfer.&lt;br /&gt;&lt;br /&gt;The comment in the &lt;em&gt;check_samples&lt;/em&gt; function details it further:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        // Normally a couple of initial samples sent by the I2S peripheral
        // will have zero values, because it starts to output the clock
        // before the actual data is fetched by EasyDMA. As we are dealing
        // with streaming the initial zero samples can be simply ignored.&lt;/pre&gt;&lt;br /&gt;You could also read more about this in the comments at the beginning of the&amp;nbsp;&lt;em&gt;prepare_tx_data&lt;/em&gt; function.&lt;br /&gt;&lt;br /&gt;I will be going out of office starting today, and I will not be back until after new years. If you require further technical support in my absence, or have any other issues or questions, please create a new ticket for this. Please also note that the forum will be operating with reduced staffing during the upcoming holiday season here in Norway - apologies for any inconveniences this might cause.&lt;br /&gt;&lt;br /&gt;I hope you have a great holiday season, Daniel! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/340144?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 15:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc54d70-58e7-4560-b073-7aded3620a26</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Thank you for testing this, that seems peculiar to me.&lt;br /&gt;I will attempt to replicate this on my end tomorrow.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/339525?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 20:46:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63743b8f-e73e-45cf-8b4e-103a43b42113</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;please check the output from the I2S example from Nordic. I only have changed the pins to use it with my current setup:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    config.sdout_pin = 27;
    config.lrck_pin  = 26;
    config.sck_pin   = 25;
    config.mck_pin   = 2;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The buffer is filled with the following values:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637181901449v2.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1637181702638v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The first words (two cycles) are zero, but my LA doesn&amp;acute;t decode the first word when LRCLK is low (don&amp;acute;t know why).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/339371?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 09:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bff9027a-093e-43dc-a052-f29543271965</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Kampino"]Because I have removed it to find the reason for the error. But I will add it again.[/quote]
&lt;p&gt;Aha, thank you for clarifying! :) Yes, I would suggest that you add it again so that you do not get these dropped samples at the end of every buffer.&amp;nbsp;&lt;/p&gt;
[quote user="Kampino"]I also found out that the I2S transmitter transmits 2x 0x00 during the first transmission. This will cause a lot of wrong data points when I only send one package with 128 bytes, disable the I2S and start it again (because I have to wait for the ADC). Anyway, the code isn´t ideal so I have to modify it :)[/quote]
&lt;p&gt;There are some &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/err_832_new.html"&gt;known I2S issues (and workarounds) for the nRF52832&lt;/a&gt;, but I have never heard about it outputting two bytes at every startup. Do you see the same behavior when you test with the unmodified I2S example from the SDK?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/339090?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 17:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a49e78dc-2172-4b53-b584-a3c9f8363db0</guid><dc:creator>Kampino</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338977#338977"]Looking back at your original post I see that you had double buffering there, but not in your latest post - what is the reason for this?&lt;br /&gt;[/quote]
&lt;p&gt;Because I have removed it to find the reason for the error. But I will add it again. I also found out that the I2S transmitter transmits 2x 0x00 during the first transmission. This will cause a lot of wrong data points when I only send one package with 128 bytes, disable the I2S and start it again (because I have to wait for the ADC). Anyway, the code isn&amp;acute;t ideal so I have to modify it :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338977?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 10:12:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66739ced-189e-450a-872e-f3517f968217</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Kampino&lt;/p&gt;
[quote user="Kampino"]This error was the reason why the copy loop copies two 16-byte values from the ADC buffer to one word in the I2S buffer. The complete code looks as shown below[/quote]
&lt;p&gt;Ah, yes, this seems like a likely explanation - keenly spotted!&lt;/p&gt;
[quote user="Kampino"]It´s not perfect, but I think it´s working now.[/quote]
&lt;p&gt;Yes, this is much better at least. I see that you get some missed samples when your buffer is filled (presumably). I recommend that you make use of the double buffering feature of the SAADC to avoid these. All you need to do in order for the SAADC to seamlessly continue into the secondary buffer when the first one is filled is to provide 2 buffers during the initialization of the SAADC. You can see this demonstrated in the SAADC peripheral example as well, in the nRF5 SDK.&lt;br /&gt;You should then get a totally &amp;#39;smooth&amp;#39; (no drops) output.&lt;br /&gt;&lt;br /&gt;Looking back at your original post I see that you had double buffering there, but not in your latest post - what is the reason for this?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338887?ContentTypeID=1</link><pubDate>Sun, 14 Nov 2021 20:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c9c4897-5eca-463a-b558-d120276f4346</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl Ylvisaker&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think I found the problem. The problem comes from a wrong pointer type. I declared&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static volatile nrf_saadc_value_t*	ADC_BlockToFill		= NULL;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;as&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static volatile uint32_t*	ADC_BlockToFill		= NULL;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This error was the reason why the copy loop copies two 16-byte values from the ADC buffer to one word in the I2S buffer. The complete code looks as shown below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_drv_ppi.h&amp;quot;
#include &amp;quot;nrf_drv_i2s.h&amp;quot;
#include &amp;quot;nrf_drv_saadc.h&amp;quot;
#include &amp;quot;nrf_drv_timer.h&amp;quot;

#include &amp;quot;app_error.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;

#define ADC_TRIGGER		15
#define LED_0			17
#define BUTTON_0		13
#define BUTTON_1		14
#define TRIGGER			31
#define SAMPLES			128

static bool				IsStarted		= false;
static volatile nrf_saadc_value_t*	ADC_BlockToFill		= NULL;
static volatile uint32_t*		I2S_BlockToFill		= NULL;

static uint32_t			I2S_Buffer[SAMPLES];
static nrf_saadc_value_t	ADC_Buffer[SAMPLES];
static nrf_ppi_channel_t	PPI_Channel;

static const nrf_drv_timer_t	Timer			= NRF_DRV_TIMER_INSTANCE(0);

void on_Timer_Handler(nrf_timer_event_t EventType, void* p_Context)
{
    nrf_gpio_pin_toggle(ADC_TRIGGER);
}

void on_SAADC_Handler(nrf_drv_saadc_evt_t const* p_Event)
{
    if(p_Event-&amp;gt;type == NRF_DRV_SAADC_EVT_DONE)
    {
        APP_ERROR_CHECK(nrf_drv_saadc_buffer_convert(p_Event-&amp;gt;data.done.p_buffer, SAMPLES));

	ADC_BlockToFill = (nrf_saadc_value_t*)p_Event-&amp;gt;data.done.p_buffer;
    }
}

static void DataHandler(nrf_drv_i2s_buffers_t const* p_Released, uint32_t Status)
{
    // &amp;#39;nrf_drv_i2s_next_buffers_set&amp;#39; is called directly from the handler
    // each time next buffers are requested, so data corruption is not
    // expected.
    ASSERT(p_Released);

    // When the handler is called after the transfer has been stopped
    // (no next buffers are needed, only the used buffers are to be
    // released), there is nothing to do.
    if(!(Status &amp;amp; NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED))
    {
        return;
    }

    if(!p_Released-&amp;gt;p_tx_buffer)
    {
        nrf_drv_i2s_buffers_t const next_buffers = {
            .p_tx_buffer = I2S_Buffer,
        };
        APP_ERROR_CHECK(nrf_drv_i2s_next_buffers_set(&amp;amp;next_buffers));
    }
    else
    {

        // The driver has just finished accessing the buffers pointed by
        // &amp;#39;p_released&amp;#39;. They can be used for the next part of the transfer
        // that will be scheduled now.
        APP_ERROR_CHECK(nrf_drv_i2s_next_buffers_set(p_Released));

        I2S_BlockToFill = (uint32_t*)p_Released-&amp;gt;p_tx_buffer;
        nrf_drv_i2s_stop();
    }

    return;
}

void SAADC_Init(void)
{
    APP_ERROR_CHECK(nrf_drv_saadc_init(NULL, on_SAADC_Handler));
    APP_ERROR_CHECK(nrf_drv_ppi_init());

    nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    timer_cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;

    APP_ERROR_CHECK(nrf_drv_timer_init(&amp;amp;Timer, &amp;amp;timer_cfg, on_Timer_Handler));
    nrf_drv_timer_extended_compare(&amp;amp;Timer, NRF_TIMER_CC_CHANNEL0, nrf_drv_timer_us_to_ticks(&amp;amp;Timer, 50), NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);
    nrf_drv_timer_enable(&amp;amp;Timer);

    APP_ERROR_CHECK(nrf_drv_ppi_channel_alloc(&amp;amp;PPI_Channel));
    APP_ERROR_CHECK(nrf_drv_ppi_channel_assign(PPI_Channel, nrf_drv_timer_compare_event_address_get(&amp;amp;Timer, NRF_TIMER_CC_CHANNEL0), nrf_drv_saadc_sample_task_get()));

    nrf_saadc_channel_config_t Channel0 = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
    Channel0.acq_time = NRF_SAADC_ACQTIME_10US;

    APP_ERROR_CHECK(nrf_drv_saadc_channel_init(0, &amp;amp;Channel0));
    APP_ERROR_CHECK(nrf_drv_saadc_buffer_convert(ADC_Buffer, SAMPLES));
    APP_ERROR_CHECK(nrf_drv_ppi_channel_enable(PPI_Channel));
}

void I2S_Init(void)
{
    nrf_drv_i2s_config_t I2S_Config = NRF_DRV_I2S_DEFAULT_CONFIG;
    I2S_Config.sdin_pin	    = NRFX_I2S_PIN_NOT_USED;
    I2S_Config.sdout_pin    = 27;
    I2S_Config.lrck_pin	    = 26;
    I2S_Config.sck_pin	    = 25;
    I2S_Config.mck_pin	    = 2;
    I2S_Config.mck_setup    = NRF_I2S_MCK_32MDIV8;
    I2S_Config.ratio	    = NRF_I2S_RATIO_96X;
    I2S_Config.channels	    = NRF_I2S_CHANNELS_STEREO;
    APP_ERROR_CHECK(nrf_drv_i2s_init(&amp;amp;I2S_Config, DataHandler));
}

int main(void)
{
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    SAADC_Init();
    I2S_Init();

    nrf_gpio_cfg_input(BUTTON_0, NRF_GPIO_PIN_PULLUP);
    nrf_gpio_cfg_input(BUTTON_1, NRF_GPIO_PIN_PULLUP);

    nrf_gpio_cfg_output(TRIGGER);
    nrf_gpio_cfg_output(LED_0);
    nrf_gpio_cfg_output(ADC_TRIGGER);
    nrf_gpio_pin_clear(TRIGGER);
    nrf_gpio_pin_set(LED_0);

    while(1)
    {
	if(nrf_gpio_pin_read(BUTTON_0) == false)
	{
	    if(IsStarted == false)
	    {
		NRF_LOG_INFO(&amp;quot;I2S sender started...&amp;quot;);
		IsStarted = true;
		nrf_gpio_pin_clear(LED_0);
		nrf_gpio_pin_set(TRIGGER);
	    }
	}
	else if(nrf_gpio_pin_read(BUTTON_1) == false)
	{
	    if(IsStarted)
	    {
		NRF_LOG_INFO(&amp;quot;I2S sender stopped...&amp;quot;);
		IsStarted = false;
		nrf_gpio_pin_set(LED_0);
		nrf_gpio_pin_clear(TRIGGER);
		nrf_drv_i2s_stop();
	    }
	}

	// ADC conversion, I2S transmitter ready and started by user?
	if(ADC_BlockToFill &amp;amp;&amp;amp; IsStarted)
        {
	    // Copy the buffer
	    for(uint32_t i = 0; i &amp;lt; SAMPLES; i++)
	    {
		//I2S_Buffer[i] = (uint32_t)(0x0000 | (i &amp;amp; 0xFFFF));
		I2S_Buffer[i] = (uint32_t)(0x0000 | (ADC_BlockToFill[i] &amp;amp; 0xFFFF));
	    }

	    nrf_drv_i2s_buffers_t const InitialBuffer = {
		.p_tx_buffer = I2S_Buffer,
		.p_rx_buffer = NULL,
	    };

	    APP_ERROR_CHECK(nrf_drv_i2s_start(&amp;amp;InitialBuffer, SAMPLES, 0));

	    ADC_BlockToFill = NULL;
        }

	if(NRF_LOG_PROCESS())
	{
	    NRF_LOG_FLUSH();
	}
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have tested the code with my 1 kHz square wave and got the following plot:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636921058332v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The signal has a length of&amp;nbsp;10 samples.&lt;br /&gt;&lt;br /&gt;And a 1 kHz tone from my speaker:&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636921421860v1.png" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636921974767v1.png" /&gt;&lt;br /&gt;It&amp;acute;s not perfect, but I think it&amp;acute;s working now. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338884?ContentTypeID=1</link><pubDate>Sun, 14 Nov 2021 16:49:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dbddbe5-8a6d-4ca8-9db6-f67e7ed9ac5d</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]How long are each of these gaps?[/quote]
&lt;p&gt;The gaps and the transmissions are around 1.5 ms long (~41.74 kHz LRCLK).&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636659829921v2.png" /&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]In your other ticket you mentioned seeing a performance increase when changing the SDK configuration as suggested in my previous comment - could you detail this performance increase?[/quote]
&lt;p&gt;Sorry, I forgot the screenshot. I think the signal quality has increased because the signal looks better (always the same height) and is less noisy (you can see it in the Fourier series).&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660026174v3.png" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660041501v4.png" /&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]Could you also possibly provide a similar plot for the case in which you were not using the SAADC to gather the I2S output?[/quote]
&lt;p&gt;Sure. Please take a look at the following plots.&lt;/p&gt;
&lt;p&gt;Change the code from&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;I2S_BlockToFill[i] = (uint32_t)(0x0000 | (ADC_BlockToFill[i] &amp;amp; 0xFFFF));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;I2S_BlockToFill[i] = (uint32_t)(0x0000 | (i &amp;amp; 0xFFFF));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Transmission captured with ILA:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660124555v5.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660382590v6.png" /&gt;&lt;/p&gt;
&lt;p&gt;I also attach my sdk_config (just to be sure&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8360.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../8360.sdk_5F00_config.h&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Edit:&lt;br /&gt;&lt;br /&gt;I have decreased the sampling rate from us to ms by changing&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_timer_extended_compare(&amp;amp;Timer, NRF_TIMER_CC_CHANNEL0, nrf_drv_timer_us_to_ticks(&amp;amp;Timer, 23), NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, false);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_timer_extended_compare(&amp;amp;Timer, NRF_TIMER_CC_CHANNEL0, nrf_drv_timer_ms_to_ticks(&amp;amp;Timer, 23), NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, false);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Edit 2:&lt;/p&gt;
&lt;p&gt;I have figured out that the I2S buffer isn&amp;acute;t filled correctly. Only the first half is filled (I suggest because of the int16 and uint32 data types):&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636908570833v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338655?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 19:54:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6caddf92-7958-4d23-a8b6-0c220da81a4f</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]How long are each of these gaps?[/quote]
&lt;p&gt;The gaps and the transmissions are around 1.5 ms long (~41.74 kHz LRCLK).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636659829921v2.png" alt=" " /&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]In your other ticket you mentioned seeing a performance increase when changing the SDK configuration as suggested in my previous comment - could you detail this performance increase?[/quote]
&lt;p&gt;Sorry, I forgot the screenshot. I think the signal quality has increased because the signal looks better (always the same height) and is less noisy (you can see it in the Fourier series).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660026174v3.png" alt=" " /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660041501v4.png" alt=" " /&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/338625#338625"]Could you also possibly provide a similar plot for the case in which you were not using the SAADC to gather the I2S output?[/quote]
&lt;p&gt;Sure. Please take a look at the following plots.&lt;/p&gt;
&lt;p&gt;Change the code from&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;I2S_BlockToFill[i] = (uint32_t)(0x0000 | (ADC_BlockToFill[i] &amp;amp; 0xFFFF));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;I2S_BlockToFill[i] = (uint32_t)(0x0000 | (i &amp;amp; 0xFFFF));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Transmission captured with ILA:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660124555v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1636660382590v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I also attach my sdk_config (just to be sure &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8360.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../8360.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338625?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 15:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ded9d0d-d17b-40c7-bca2-3c9dbf710e43</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Kampino,&lt;/p&gt;
[quote user="Kampino"]I have visualized the transmission between the nRF52 and the FPGA over I2S with my ILA.&amp;nbsp;The gap and the transmissions have the same length.[/quote][quote user="Kampino"]So there is a transmission gap for sure.&amp;nbsp;[/quote]
&lt;p&gt;Thank you for this update - this is very helpful.&lt;br /&gt;How long are each of these gaps?&lt;br /&gt;In your other ticket you mentioned seeing a performance increase when changing the SDK configuration as suggested in my previous comment - could you detail this performance increase?&lt;br /&gt;Could you also possibly provide a similar plot for the case in which you were not using the SAADC to gather the I2S output?&lt;/p&gt;
[quote user="Kampino"]Please also note that I don´t use any input signal in this case. I just sample the noise of the ADC.[/quote]
&lt;p&gt;Thank you for clarifying - This should not matter for the frequency of the sampling / outputted samples, but it is good to know nevertheless.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338589?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 13:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ef73e2f-82db-4a99-a745-135cb2085414</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl Ylvisaker&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have visualized the transmission between the nRF52 and the FPGA over I2S with my ILA.&amp;nbsp;The gap and the transmissions have the same length.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0841.pastedimage1636615743931v1.png" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So there is a transmission gap for sure.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please also note that I don&amp;acute;t use any input signal in this case. I just sample the noise of the ADC.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338366?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 12:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23143843-98cd-4921-99fd-ea7891ea77c3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Great - I look forward to hearing your results! :)&amp;nbsp;&lt;br /&gt;In the case that you do not see a noticeable difference, could you have the SAADC sample a sine wave instead, and share its raw digital output with me, along with the sine&amp;#39;s frequency and amplitude, so I may take a closer look at what might be going wrong.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338362?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 11:57:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07195410-2f9a-405a-8777-6638cd025253</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;br /&gt;&lt;br /&gt;thank you for your reply. I will check it as soon as I have time for it. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; (hopefully today or tomorrow)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338360?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 11:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9acdc7e8-a9a8-41c6-92c8-2c82c8273912</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your patience.&lt;br /&gt;&lt;br /&gt;Could you set your SAADC to be in non-low power mode? This is configured by the&amp;nbsp;NRFX_SAADC_CONFIG_LP_MODE. Low power mode has a slightly higher latency on buffer shifts, which may degrade performance in your case.&lt;br /&gt;&lt;br /&gt;I also notice in the sdk_config that you have the legacy TIMER_ENABLED defined, while also having the NRFX_TIMER_ENABLED defined. This will cause the apply_old_config file to overwrite your NRFX_TIMER configurations. It is recommended that you remove all the legacy define (remove completely, do not leave it &lt;em&gt;defined&amp;nbsp;&lt;/em&gt;to 0) when using the NRFX drivers. I notice that this is also the case for your I2S configuration.&lt;br /&gt;Please change this as well, so that only the NRFX_ configurations remains.&lt;br /&gt;&lt;br /&gt;Let me know if you see any difference when you are no longer using the SAADC in low-power mode.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/338010?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 20:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd618948-d1e6-4fc1-81ee-ffb99451f8bf</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;br /&gt;&lt;br /&gt;please take a look at the attached file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/60011.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../60011.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337850?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 09:26:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe0382ff-ce3c-48c1-9222-2a7328ccfba4</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Kampino"]no this is the complete program and the program shouldn´t do more tasks. I only want to use the nRF52 to test the I2S receiver for my FPGA.[/quote]
&lt;p&gt;Thank you for clarifying - I assumed so from your original post, but I thought it best to be completely sure.&lt;br /&gt;&lt;br /&gt;Could you also share with me your sdk_config.h file?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337797?ContentTypeID=1</link><pubDate>Sat, 06 Nov 2021 21:35:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9734d473-1b80-4fea-b62f-5ea83da06a9f</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;br /&gt;&lt;br /&gt;no this is the complete program and the program shouldn&amp;acute;t do more tasks. I only want to use the nRF52 to test the I2S receiver for my FPGA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337648?ContentTypeID=1</link><pubDate>Fri, 05 Nov 2021 10:20:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:124b9309-3b39-45d9-ad2e-48a1d1686634</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;/p&gt;
[quote user="Kampino"]sorry I meant I2S (not I2C as you mentioned - I have fixed it). Please take a look at the overview drawing.[/quote]
&lt;p&gt;Thank you for clarifying this with the drawing - this does indeed make the overview a lot more clear! :)&amp;nbsp;&lt;/p&gt;
[quote user="Kampino"]The &amp;quot;Microphone&amp;quot; is replaced by my squarewave generator, but the idea is that the nRF52 will sample the analog input signal with a SAADC and transmit the sampled signal over I2S to my master.[/quote]
&lt;p&gt;Sure, this is a good way to simulate it for testing.&lt;br /&gt;Could you perhaps set the generator to a sine-wave, and share the SAADC&amp;#39;s raw measurements of this with me? This should help us pinpoint the issue.&lt;/p&gt;
[quote user="Kampino"]So I think that the conversion with the ADC and the transmission over I2S runs into some sort of error (i. e. overwriting data while they got transmitted, etc.), but I can not figure out the problem.[/quote]
&lt;p&gt;Yes, from your testing it sounds like it might be an issue with the SAADC usage. However, I do not immediately see what that might be what might be causing this. Is the code you shared&amp;nbsp;earlier the complete code that is running, or only a section of a larger program?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337148?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 17:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c18ccb44-512f-4fb2-bf37-d68cba561281</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;sorry I meant I2S (not I2C as you mentioned - I have fixed it). Please take a look at the overview drawing.&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7652.Setup.png" /&gt;&lt;br /&gt;The &amp;quot;Microphone&amp;quot; is replaced by my squarewave generator, but the idea is that the nRF52 will sample the analog input signal with a SAADC and transmit the sampled signal over I2S to my master.&lt;br /&gt;&lt;br /&gt;But it turns out that the signal quality on my master is very bad (see the screenshot) when I use the SAADC to sample the analog audio signal and use the result as the I2S data. The quality is good when I don&amp;acute;t use the SAADC&amp;nbsp;and generate the I2S data &amp;quot;on the fly&amp;quot; by the CPU (in this case a ramp).&lt;br /&gt;&lt;br /&gt;So I think that the conversion with the ADC and the transmission over I2S runs into some sort of error (i. e. overwriting data while they got transmitted, etc.), but I can not figure out the problem.&lt;/p&gt;
&lt;p&gt;Hope it is clear now :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337147?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 17:32:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4919492d-d100-4b1e-95cb-0cc4dc7eb85d</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Kampino"]what do you mean by this question? I already use the I2C peripheral to stream out the data from the nRF52832[/quote]
&lt;p&gt;I meant the &lt;em&gt;I2S,&amp;nbsp;&lt;/em&gt;not&amp;nbsp;&lt;em&gt;I2C / TWI&amp;nbsp;&lt;/em&gt;- I was of the understanding from your initial ticket that you were using the SAADC to&amp;nbsp;&lt;em&gt;read&lt;/em&gt; (through sampling) a I2S signal, is this not the case?&lt;br /&gt;If so, I would advice that you make use of the nRF52832&amp;#39;s I2S peripheral directly, instead of reading it with the SAADC.&lt;br /&gt;&lt;br /&gt;I posed the question in case there was a constraint or requirement by your application that forced you to use the SAADC instead of the I2S peripheral to read the incoming I2S data stream, that I might not be aware of. If there is not, then I think we should look at switching to using the I2S peripheral instead :)&amp;nbsp;&lt;br /&gt;How do you think this would fit with your application?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/337141?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 16:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:516ce4c5-b692-404f-a3d0-afbebc6afb0f</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/81254/streaming-audio-data-from-adc-with-i2s/336921#336921"]Is there a particular reason why you are not using &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fi2s.html&amp;amp;anchor=concept_z2v_24y_vr"&gt;the nRF52832&amp;#39;s I2S peripheral directly for this&lt;/a&gt;?[/quote]
&lt;p&gt;what do you mean by this question? I already use the I2S peripheral to stream out the data from the nRF52832, but the data is generated by an ADC that samples some sort of device to get the audio data. In my setup, the &amp;quot;device&amp;quot; is a 3.3 V square wave generator, but it should get replaced with an analog microphone. I only use the generator to get a known signal.&lt;/p&gt;
&lt;p&gt;Feel free to ask if you have additional questions :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Streaming audio data from ADC with I2S</title><link>https://devzone.nordicsemi.com/thread/336921?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 16:16:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1e11045-716e-4601-b60b-77b6b35e8212</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I try to stream some audio data (currently a 1 kHz square wave signal with 3.3 V peak) over I2S. The audio signal is sampled by an ADC in the free-running mode.[/quote][quote user=""]So it looks like the problem is based on the ADC. I have tried to use two buffers to use the same swapping buffer system as in the I2S example.&lt;br /&gt;&lt;br /&gt;How can I improve this result?[/quote]
&lt;p&gt;Is there a particular reason why you are not using &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fi2s.html&amp;amp;anchor=concept_z2v_24y_vr"&gt;the nRF52832&amp;#39;s I2S peripheral directly for this&lt;/a&gt;?&lt;br /&gt;If there is, please let me know about your application requirements and constraints, so I may advice you on how to increase the performance according to this.&lt;br /&gt;If there is an option to instead use the I2S peripheral directly then this is what I would advice, as this should give you a great performance increase compared to what you are seeing now, without involving the SAADC peripheral.&lt;br /&gt;&lt;br /&gt;If you are not sure how to use the I2S peripheral it may be helpful to take a look at &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/i2s_example_loopback.html"&gt;the I2S loopback example from the nRF5 SDK&lt;/a&gt;&amp;nbsp;which demonstrates both output and input using the peripheral.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>