<?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>Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126619/upgrading-from-ncsv3-0-0-to-ncsv3-2-1-i2s-issue</link><description>hello, We have a project that uses sound for distance measurement. 
 When I upgraded from NCSv3.0.0 to NCSv3.2.1, I encountered a problem where the i2s function stopped working. 
 The following is the driver code for NCSv3.0.0.Can be used normally. Main</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Jan 2026 15:18:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126619/upgrading-from-ncsv3-0-0-to-ncsv3-2-1-i2s-issue" /><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559591?ContentTypeID=1</link><pubDate>Mon, 26 Jan 2026 15:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340e2cd9-f508-4a3e-b138-94758e3d6139</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The assertion happens because the driver remains in RX-only mode when &lt;code&gt;start_real_data = true;&lt;/code&gt; is set, but then in &lt;code&gt;i2s_comp_handler&lt;/code&gt; only TX buffer is set after &lt;code&gt;if (!start_real_data) {} else {&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To change the driver operating mode (RX-only to TX-only), you must first stop the I2S using &lt;code&gt;nrfx_i2s_stop&lt;/code&gt;, wait for &lt;code&gt;NRFX_I2S_STATUS_TRANSFER_STOPPED&lt;/code&gt; status, and restart the I2S in TX mode.&lt;/p&gt;
&lt;p&gt;Waiting for &lt;code&gt;NRFX_I2S_STATUS_TRANSFER_STOPPED&lt;/code&gt; is missing in the existing code, hence a potential race condition.&lt;/p&gt;
&lt;p&gt;Additionally, I see &amp;quot;dummy&amp;quot; RX buffer is set only once - I think it must be set continuously during the 250ms wait period in &lt;code&gt;i2s_comp_handler&lt;/code&gt; on each &lt;code&gt;NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED&lt;/code&gt;. I might be wrong, but I think otherwise the clock is not generated during the whole 250ms time period.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559546?ContentTypeID=1</link><pubDate>Mon, 26 Jan 2026 10:03:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b35fa57-e65c-4d05-aad4-47ffabd9a3de</guid><dc:creator>yuanFang</dc:creator><description>&lt;p&gt;hi,&lt;br /&gt;I tried your method, and the code is as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void i2s_comp_handler(nrfx_i2s_buffers_t const *released_bufs, uint32_t status)
{
    if (!(status &amp;amp; NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED)) {
        // printk(&amp;quot;i2s No buffer stop : %d\n&amp;quot;, status);
        return;
    }


if (!start_real_data) {
    // printk(&amp;quot;i2s No start_real_data stop : %d\n&amp;quot;, status);
    return;
}

    if (released_bufs-&amp;gt;p_tx_buffer == m_buffer_tx[0]/*!(current_buf % 2)*/) {
        current_buf += 1;
        singleGetAudioDataToTxBuf(bpsk_tata, m_buffer_tx[0], m_buffer_tx[1], current_buf);
        const nrfx_i2s_buffers_t next_buffers1 = {
            .p_rx_buffer = NULL,
            .p_tx_buffer = m_buffer_tx[0],
            .buffer_size = I2S_DATA_BLOCK_WORDS};
        nrfx_i2s_next_buffers_set(&amp;amp;i2s_inst, &amp;amp;next_buffers1);
        // printk(&amp;quot;i2s event handler 1 :%d %d %d %d\n&amp;quot;,released_bufs-&amp;gt;p_tx_buffer[0],m_buffer_tx[0][0], m_buffer_tx[0][1],m_buffer_tx[0][191]);
    } else if (released_bufs-&amp;gt;p_tx_buffer == m_buffer_tx[1] /*(current_buf % 2)*/) {
        current_buf += 1;
        singleGetAudioDataToTxBuf(bpsk_tata, m_buffer_tx[0], m_buffer_tx[1], current_buf);
        const nrfx_i2s_buffers_t next_buffers2 = {
            .p_rx_buffer = NULL,
            .p_tx_buffer = m_buffer_tx[1],
            .buffer_size = I2S_DATA_BLOCK_WORDS};
        nrfx_i2s_next_buffers_set(&amp;amp;i2s_inst, &amp;amp;next_buffers2);
        // printk(&amp;quot;i2s event handler 2 :%d %d %d %d %d %d\n&amp;quot;,released_bufs-&amp;gt;p_tx_buffer[0],m_buffer_tx[1][0], m_buffer_tx[1][135],m_buffer_tx[1][136],m_buffer_tx[1][190],m_buffer_tx[1][191]);
    }
    if(!released_bufs-&amp;gt;p_tx_buffer) {
        current_buf += 1;
        singleGetAudioDataToTxBuf(bpsk_tata, m_buffer_tx[0], m_buffer_tx[1], current_buf);
        const nrfx_i2s_buffers_t next_buffers2 = {
            .p_rx_buffer = NULL,
            .p_tx_buffer = m_buffer_tx[1],
            .buffer_size = I2S_DATA_BLOCK_WORDS};
        nrfx_i2s_next_buffers_set(&amp;amp;i2s_inst, &amp;amp;next_buffers2);
        // printk(&amp;quot;i2s event handler 0 :%d %d %d %d\n&amp;quot;,released_bufs-&amp;gt;p_tx_buffer[0],m_buffer_tx[1][0], m_buffer_tx[1][1],m_buffer_tx[1][191]);
    }
}
static uint32_t m_buffer_rx[2][96] = {0};

void es8311Play()
{
    current_buf = 0;
    current_index = 0;
    buf_end_flag = 0;

    start_real_data = false;

    const nrfx_i2s_buffers_t initial_buffers_test = {
        .p_rx_buffer = m_buffer_rx[0],
        .p_tx_buffer = NULL,
        .buffer_size = 1};
    int ret = nrfx_i2s_start(&amp;amp;i2s_inst, &amp;amp;initial_buffers_test, 0);
    if (ret != 0) {
        printk(&amp;quot;Failed to start I2S111111: %d\n&amp;quot;, ret);
    }

    pf_gpio_write(GPIO_PA_GPIO, 1);
    k_sleep(K_MSEC(250));
    start_real_data = true;
    nrfx_i2s_stop(&amp;amp;i2s_inst);

    es8311_i2s_start();

    do 
    {
        __WFE();
        __SEV();
        __WFE();
    } while (current_buf &amp;lt; BLOCKS_TO_TRANSFER);
    nrfx_i2s_stop(&amp;amp;i2s_inst);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;nrfx_i2s_start()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;p_tx_buffer&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;,&amp;nbsp; and&amp;nbsp;a &amp;quot;dummy&amp;quot; RX buffer,size = 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.&amp;nbsp;Turn on the PA&lt;br /&gt;3. delay 250ms&lt;br /&gt;4.&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrfx_i2s_stop&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;i2s_inst&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5. nrfx_i2s_start() ,Start sending the actual data.&lt;br /&gt;&lt;br /&gt;After running for a period of time, a problem of system freeze was discovered.&lt;br /&gt;&lt;br /&gt;ASSERTION FAIL [p_buffers-&amp;gt;p_rx buffer I= ((void *)0)] @WEST_TOPDIR/modules/hal/nor di c/nr fx/drivers/sro/nr fx_i2s. c:422&lt;br /&gt;&lt;br /&gt;Look forward to your reply!&lt;br /&gt;Thanks&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559432?ContentTypeID=1</link><pubDate>Fri, 23 Jan 2026 06:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f42c196-de2f-41d2-9f63-334e038a1091</guid><dc:creator>yuanFang</dc:creator><description>&lt;p&gt;Hi，&lt;/p&gt;
&lt;p&gt;I tried some other approaches, but the results were not as good as those of ncsv3.0.0. I wonder if any of you have better methods.&lt;br /&gt;&lt;br /&gt;I also came up with an idea: to separate the NCSv3.0.0 I2s driver file and place it on NCSv3.2.1. During the compilation process, specify the NCSv3.0.0 I2s driver file. Will this method work?&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Look forward to your reply!&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559422?ContentTypeID=1</link><pubDate>Fri, 23 Jan 2026 02:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8871807f-2556-4836-b1fc-5f56a6b2d9ce</guid><dc:creator>yuanFang</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your reply.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please provide an example based on my description?&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;One of the devices only has the function of playing (TX) but not receiving (RX).&lt;br /&gt;2.&amp;nbsp;In the NCSv3.0.0 version, the actual data sent was &amp;quot;int16_t bpsk_tata[1521]&amp;quot;, and the buffer_size for each I2S transmission was 192.&lt;br /&gt;3.&amp;nbsp;According to what you said, when TX_buffer is NULL, what should be the size of buffer_size? What should be done in the i2s_comp_handler?&lt;br /&gt;4.&amp;nbsp;When the delay of 250ms is over, will the actual data be directly switched in the i2s_comp_handler(), or will it be sent first by calling i2s_stop() and then I2s_start()?&lt;br /&gt;&lt;br /&gt;The distance measurement is conducted once every 1 second. Each playback and reception must be synchronized, and the error should be within 100 microseconds. Therefore, I need to ensure that the timing when sending dummy data and then switching to real data is fixed.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Thank you very much for your kind assistance.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Look forward to your reply!&lt;br /&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559372?ContentTypeID=1</link><pubDate>Thu, 22 Jan 2026 13:41:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00a24412-144e-4a2e-ae32-a0bb30707404</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="yuanFang"]I need a method that starts the I2S clock but does not send any data before calling the function nrfx_i2s_start().[/quote]
&lt;p&gt;You can&amp;nbsp;use nrfx_i2s_start() and provide a NULL TX buffer and a &amp;quot;dummy&amp;quot; RX buffer. This will start the actual transaction (SCK and LRCK clocks) and fill the RX buffer, but the data in the RX buffer can be ignored.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559320?ContentTypeID=1</link><pubDate>Thu, 22 Jan 2026 01:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:862700e6-f42b-45a0-8cb4-c0af6ec81da1</guid><dc:creator>yuanFang</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for your reply.&lt;br /&gt;&lt;br /&gt;I know that I used the register and the API together.Due to the nature of the project, I had no choice but to do so, and the first version has already been verified by NCSv3.0.0.&lt;br /&gt;&lt;br /&gt;I need a method that starts the I2S clock but does not send any data before calling the function nrfx_i2s_start().&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Look forward to your reply!&lt;/span&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559287?ContentTypeID=1</link><pubDate>Wed, 21 Jan 2026 15:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa45783-e047-4616-89f0-a12ea556b102</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From your code, it appears that you are mixing &lt;code&gt;nrfx_*&lt;/code&gt; API calls with direct register access. This usage is not supported, and we do not test such scenarios because it is not possible to predict how users may manipulate the peripheral outside the &lt;code&gt;nrfx_*&lt;/code&gt; API context.&lt;/p&gt;
&lt;p&gt;The crash likely occurs because an interrupt is triggered between &lt;code&gt;nrfx_i2s_init&lt;/code&gt; and &lt;code&gt;nrfx_i2s_start&lt;/code&gt;. In that window, &lt;code&gt;nrfx_i2s_next_buffers_set&lt;/code&gt; is called from the callback context. However, this function checks the driver state and expects it to be &lt;code&gt;POWERED_ON&lt;/code&gt;, which is only set in &lt;code&gt;nrfx_i2s_start&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This behavior is a direct consequence of accessing the peripheral through registers instead of exclusively using the &lt;a href="https://docs.nordicsemi.com/bundle/nrfx-apis-latest/page/group_nrfx_i2s.html"&gt;I2S driver&lt;/a&gt;&amp;nbsp;API.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upgrading from NCSv3.0.0 to NCSv3.2.1, I2S issue</title><link>https://devzone.nordicsemi.com/thread/559205?ContentTypeID=1</link><pubDate>Tue, 20 Jan 2026 21:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:751b5e4c-29b9-4acb-aab4-4b16f223c52c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on your issue and need time to get back to you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>