<?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>Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73037/glitch-in-analog-audio-output-when-using-i2s-module</link><description>Hello. 
 I&amp;#39;m using the NRF52832 with I2S module connected to TLV320DAC from TI. I&amp;#39;ve configured the DAC and I2S module successfully. I&amp;#39;m getting audio output (simple sine wave read from a table) but there is an impulse glitch in the audio signal. The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Apr 2021 22:23:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73037/glitch-in-analog-audio-output-when-using-i2s-module" /><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306889?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 22:23:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b55bce-0319-4afc-be34-f06d73896b16</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Thanks for that Kenneth. Yes, I sort of barged my way into this thread not realising how isolated the nRF5 world was from the NCS world, so I&amp;#39;m sorry for the confusion.&lt;/p&gt;
&lt;p&gt;I appreciate that list of CONFIGs. Haven&amp;#39;t been burnt so bad stepping into the unknown so many times in this project so far, I&amp;#39;m going to tread very carefully. Every CONFIG seems to have unintended consequences that soak up precious hours. So to be honest, unless a compelling reason comes up, or some really good documentation, I&amp;#39;m going to leave sleeping&amp;nbsp;dogs lie! Great to have them to refer back to though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306745?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 10:02:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32f8d4af-1153-4a64-b682-d44a4e55fdd2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sorry, I forgot you were using NCS, my screenshot were for nRF5 SDK. In your case I guess you can add the following to prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Debugging configuration
CONFIG_THREAD_NAME=y
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
CONFIG_THREAD_ANALYZER_USE_PRINTK=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_PRINTK=y
CONFIG_USE_SEGGER_RTT=n

# add asserts
CONFIG_ASSERT=y
CONFIG_ASSERT_VERBOSE=y
CONFIG_ASSERT_NO_COND_INFO=n
CONFIG_ASSERT_NO_MSG_INFO=n
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_THREAD_NAME=y
CONFIG_ARM_MPU=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306624?ContentTypeID=1</link><pubDate>Sat, 24 Apr 2021 00:03:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c0fe5e1-5482-41f0-a5bb-8798d840edef</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Ah! Good to know thank you. I can confirm that those configurations certainly don&amp;#39;t appear if you follow the nRF Connect SDK installation instructions, at least as of a month ago.&lt;/p&gt;
&lt;p&gt;I feel I&amp;#39;m probably not missing out on anything anyway, since &amp;quot;DEBUG_NRF&amp;quot; does not appear in the SDK anywhere:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/search?q=org%3Anrfconnect+DEBUG_NRF&amp;amp;type=code"&gt;github.com/search&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As far as I can tell, that define is obsolete. I think the current way to do it is CONFIG_DEBUG and friends but I&amp;#39;m working blind so I&amp;#39;m not sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306523?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 11:40:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83cc6da7-85e6-40f4-bb13-078977bdde35</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Typically you can choose between Release and Debug in SES by:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619177962582v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The difference between the two is found by opening the project file in text editor, e.g.:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  &amp;lt;configuration Name=&amp;quot;Release&amp;quot;
    c_preprocessor_definitions=&amp;quot;NDEBUG&amp;quot;
    link_time_optimization=&amp;quot;No&amp;quot;    gcc_optimization_level=&amp;quot;Optimize For Size&amp;quot; /&amp;gt;
  &amp;lt;configuration Name=&amp;quot;Debug&amp;quot;
    c_preprocessor_definitions=&amp;quot;DEBUG; DEBUG_NRF&amp;quot;
    gcc_optimization_level=&amp;quot;None&amp;quot;/&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306463?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 06:11:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bdfb799-bb72-4acc-8518-6e7ee775edef</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Aaargh! These issues are three layers deep!&lt;/p&gt;
&lt;p&gt;So while the word-alignment issue I&amp;#39;ve raised is still valid, it turns out cory123&amp;#39;s suggestion from a month ago about having to double buffer the data &lt;strong&gt;is also true&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;After re-reading the docs, I see that the driver only double buffers &lt;strong&gt;the pointer&lt;/strong&gt;! So yes, the user also has to double buffer the data, because the driver requests more data before it has finished reading from that previously provided.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306455?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 04:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72f492d1-f8b9-4370-a25a-2ca2317ac2fa</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Oh dear. Not only was it a mission to effectively define DEBUG_NRF with the nRF Connect SDK, after&amp;nbsp;spending far too long trying to figure out why it wasn&amp;#39;t working, I finally discover that DEBUG_NRF isn&amp;#39;t even part of the SDK! It does not appear anywhere, and is only found in projects with a nRF5x library. This being a nRF9x project does not use it at all!&lt;/p&gt;
&lt;p&gt;So I finally discover that the way&amp;nbsp;to do it now is to use CONFIG_ASSERT - only to find that my bare bones application will no longer run thanks to a mysterious assertion fail in a part of the SDK I&amp;#39;ve never looked at:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;ASSERTION FAIL [((arch_is_in_isr() == 0) || ((timeout).ticks == (((k_timeout_t) {})).ticks))] @ WEST_TOPDIR/zephyr/kernel/sem.c:140&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The fail is deep within&amp;nbsp;disk_access_init --&amp;gt;&amp;nbsp;sdhc_spi_detect --&amp;gt;&amp;nbsp;spi_nrfx_transceive, but I can&amp;#39;t afford to spend any more time unpicking the incomplete nRF SDK. Will have to make do and move on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306434?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 20:33:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36c7da19-f690-4789-ad55-597d5dedeb31</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Okay thank you. It&amp;#39;s a little off-topic, but I have been looking for some guidance for performing a debug build but have not been able to locate any. I cannot find any documentation on DEBUG_NRF. There is no reference to a &amp;quot;Debug&amp;quot; build in the NRF Connect SDK docs, including those associated with running the debugger in SES.&lt;/p&gt;
&lt;p&gt;The closest I&amp;#39;ve come to instructions on performing a debug build is the notes of a few users, such as &lt;a href="https://jimmywongiot.com/2020/09/26/some-hints-on-nrf-connect-sdk-ncs/"&gt;Jimmy Wong&lt;/a&gt;, who list &amp;quot;CONFIG_LOG&amp;quot;, &amp;quot;CONFIG_LOG_DEFAULT_LEVEL&amp;quot; and &amp;quot;&lt;span&gt;CONFIG_DEBUG_OPTIMIZATIONS&amp;quot; as the relevant options.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you aware of any documentation on doing a debug &lt;em&gt;build&lt;/em&gt; when working with a project based on the NRF Connect SDK?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306269?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 09:42:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79c030de-b4eb-4c61-a512-2edc043172bf</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Well spotted, you are likely compiling your code with &amp;quot;Release&amp;quot;, not &amp;quot;Debug&amp;quot;, then the code will not do these checks, ref:&lt;/p&gt;
&lt;div&gt;#if (defined(DEBUG_NRF) || defined(DEBUG_NRF_USER))&lt;br /&gt; #define NRF_ASSERT_PRESENT 1&lt;br /&gt; #else&lt;br /&gt; #define NRF_ASSERT_PRESENT 0&lt;br /&gt; #endif&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306201?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 00:32:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38f3152f-f787-4c6f-a3b4-8a78c38b2cc6</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Oh boy. I discovered why. The buffer I was passing was not word aligned. Variables aren&amp;#39;t necessary so. The I2S driver checks and enforces word alignment, but the code that does so gets compiled to a nop! This is the critical line of code:&lt;/p&gt;
&lt;pre&gt;NRFX_ASSERT((p_initial_buffers-&amp;gt;p_tx_buffer == NULL) ||
                (nrfx_is_in_ram(p_initial_buffers-&amp;gt;p_tx_buffer) &amp;amp;&amp;amp;
                 nrfx_is_word_aligned(p_initial_buffers-&amp;gt;p_tx_buffer)));&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Alas, it turns out &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;NRFX_ASSERT&lt;/span&gt; expands to nothing, so the misalignment goes unnoticed. Assumedly the DMA then takes no notice of the lower two bits in the pointer, resulting in a start address that is half a word early.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve now declared my buffer with the suffix &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;__attribute__((aligned(4)))&lt;/span&gt; and all is rosy.&lt;/p&gt;
&lt;p&gt;Pretty tough going here...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306200?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 22:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00477142-8372-4d6f-96f3-0a3bc29f77c1</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Thanks Kenneth. Yes I&amp;#39;ve already studied those documents more than I was hoping to have to.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve even gone so far as to review the driver code. As far as I can tell it is following the instructions as given in the product specification.&lt;/p&gt;
&lt;p&gt;Nonetheless, I can now reliably demonstrate that the DMA is sucking data from before the buffer pointer passed to it. Here&amp;#39;s what I found:&lt;/p&gt;
&lt;p&gt;If I pass a&amp;nbsp;pointer to a buffer containing N words of 32 bits, what comes out the SDOUT pin is the data in the buffer, &lt;strong&gt;starting&amp;nbsp;one half-word before the start of the buffer, and ending one half-word before the end of the buffer&lt;/strong&gt;. The LRCLK pin also behaves this way, going low one half word too early (the net effect being that it is inverted).&lt;/p&gt;
&lt;p&gt;In other words, if my buffer contains 2 words, with bytes &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[0][1][2][3][4][5][6][7]&lt;/span&gt;, and I supply the buffer to each call to&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_i2s_next_buffers_set&lt;/span&gt;, the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SDOUT&lt;/span&gt; pin will show &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[X][X][1][0][3][2][5][4]&lt;/span&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[X][X][1][0][3][2][5][4]&lt;/span&gt;, where &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[X][X]&lt;/span&gt; is the contents of memory before the start of the buffer. If you compensate for fact that it appears the DMA is expecting little-endian half-words (which makes sense), then the digital stream lines up exactly with the explanation that it &lt;strong&gt;starts one half-word before the start of the buffer and ends one half-word before the end of the buffer&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/306006?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 08:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc1e4562-a859-4354-9bc5-0845aa8075d3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Not sure if I have any idea here, you could try to read the I2S chapter in the product specification for any suggestion also:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/i2s.html#concept_z2v_24y_vr"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/i2s.html#concept_z2v_24y_vr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may also look into placing the i2s buffers into a specific RAM section not used by other peripherals:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/memory.html#memory"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/memory.html#memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/305981?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 05:57:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7e10a93-02e0-4d90-97bd-eb2918e61d44</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;Okay, looks like I was have been deceived. The&amp;nbsp;scratch&amp;nbsp;buffer seems to have only masked the issue. After&amp;nbsp;some seemingly unrelated code changes&amp;nbsp;the original symptoms returned. This time I managed to suppress them simply by adding an extra word to the start of the buffer, and then&amp;nbsp;passing a pointer to index 1 instead! It&amp;#39;s as if the DMA is sucking data from *before* the buffer pointer passed to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/305966?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 00:23:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cf773a2-cf06-4e0a-af62-14b7120cd945</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;I&amp;#39;m seeing the same symptoms with a nRF9160, measured right at the SDOUT pin. I also found the problem did not go away with changes to the buffer size or its contents. Even with a buffer of all zeros, padded to protect against overruns, a glitch would occur between buffers.&lt;/p&gt;
&lt;p&gt;Unlike the OP, I found that double buffering my source data only made the problem half as frequent! That led me to try some variations, eventually resulting in this discovery:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Whenever the original buffer (the one passed to &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_i2s_start&lt;/span&gt;) is reused&amp;nbsp;by passing it to &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_i2s_next_buffers_set&lt;/span&gt;, the glitch occurs!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So instead of double buffering, I had to use a&amp;nbsp;throw-away buffer for the start, and could then happily keep using the same buffer in every update after that.&lt;/p&gt;
&lt;p&gt;The relevant code is as follows:&lt;/p&gt;
&lt;pre&gt;ISR_DIRECT_DECLARE(i2s_isr_handler)
{
  nrfx_i2s_irq_handler();
  ISR_DIRECT_PM(); /* PM done after servicing interrupt for best latency */

  return 1; /* We should check if scheduling decision should be made */
}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;void init(void)
{
  IRQ_DIRECT_CONNECT(I2S_IRQn, 0, i2s_isr_handler, 0);

  nrfx_i2s_config_t config = NRFX_I2S_DEFAULT_CONFIG(I2S_SCK_PIN,                       \
                                                     I2S_WS_PIN,                        \
                                                     NRFX_I2S_PIN_NOT_USED, /* MCK */   \
                                                     I2S_SD_PIN,            /* SDOUT */ \
                                                     NRFX_I2S_PIN_NOT_USED  /* SDIN */);
  config.mck_setup = NRF_I2S_MCK_32MDIV23; //32 MHz / 23 = 1.391304 MHz
  config.channels = NRF_I2S_CHANNELS_STEREO;
  
  nrfx_i2s_init(&amp;amp;config, data_handler);
  nrfx_i2s_start(&amp;amp;gI2SBuffers0, I2S_DATA_BLOCK_WORDS, 0);&lt;/pre&gt;
&lt;pre&gt;}&lt;/pre&gt;
&lt;pre&gt;static void data_handler(nrfx_i2s_buffers_t const* pReleased, uint32_t status)
{
  if(status | NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED)
    nrfx_i2s_next_buffers_set(&amp;amp;gI2SBuffers1);
}&lt;br /&gt;
&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/301241?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 14:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a96896ec-2111-4aec-b2f5-c5bbd54dbaaf</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Looks like it&amp;#39;s trying to play a sample back in time (old sample)? Maybe you are not updating the buffers fast enough (or not using two buffers)?&lt;/p&gt;
&lt;p&gt;Can you try to call&amp;nbsp;nrf_drv_i2s_start(m_buffer_tx[0]) and then immediately&amp;nbsp;nrf_drv_i2s_next_buffers_set(m_buffer_tx[1]) to prepare next buffer already? (This should however already be done by data_handler()) .Then in &lt;span&gt;data_handler()&lt;/span&gt;&amp;nbsp;you would alternate between&amp;nbsp;m_buffer_tx[0] and [1] when calling nrf_drv_i2s_next_buffers_set(), just making sure you are not always using &lt;span&gt;m_buffer_tx[1] and/or updating&amp;nbsp;m_buffer_tx[1] when that is being played&lt;/span&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/301100?ContentTypeID=1</link><pubDate>Mon, 22 Mar 2021 03:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4bbbbae-92b0-4ed4-ac02-5bb3dc16d4ba</guid><dc:creator>cory123</dc:creator><description>&lt;p&gt;After some experiments, I found that you must use a double buffered scheme. This is not mentioned in the documentation and not too obvious from the single I2S example. The two sample buffers need to be passed in one when starting I2S and the other inside handler, the first iteration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/301028?ContentTypeID=1</link><pubDate>Sat, 20 Mar 2021 02:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9478edb0-7ea5-430e-b7dc-604b0f7a36b5</guid><dc:creator>cory123</dc:creator><description>&lt;p&gt;Another observation. It seems like the last sample the buffer is carried over to the next buffer. The sample value at the glitch appears to be the value which should be at the previous glitch location. I still don&amp;#39;t know if this is a bug in my code or possibly the I2S driver. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Glitch in analog audio output when using I2S module</title><link>https://devzone.nordicsemi.com/thread/301027?ContentTypeID=1</link><pubDate>Sat, 20 Mar 2021 02:20:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60ffb7df-db6e-4b5f-9ead-78ddc97f63f6</guid><dc:creator>cory123</dc:creator><description>&lt;p&gt;Here&amp;#39;s another possible clue. When I set the buffer size to 64 samples the glitch occurs frequently. When the sine wave increases, the glitch is in the negative direction. When the sine wave decreases, the glitch is in the positive direction. I don&amp;#39;t know what that means but may be useful.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="161" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/dac_5F00_glitchc.png" width="429" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>