<?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>nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102554/nrf5340-i2s-microphone-in-zephyr</link><description>Hello, I&amp;#39;m trying to get an I2S microphone working and have not had any success. I&amp;#39;ve done my best to review the other I2S related issues for the nrf5340 in Zephyr, but I&amp;#39;m obviously missing something. Situation: I have an I2S microphone (44.1KHz, 24bit</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Nov 2023 16:19:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102554/nrf5340-i2s-microphone-in-zephyr" /><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/454751?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 16:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:542b76b8-4233-4892-a25d-3eb9b7cc2882</guid><dc:creator>Johnny Nguyen</dc:creator><description>&lt;p&gt;I see.&lt;/p&gt;
&lt;p&gt;I would advise starting a separate ticket on this and provide your NCS version and hardware when you do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/454576?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 06:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b03fe86f-6551-4985-b75a-c3b65b647812</guid><dc:creator>Lokesh Mahajan</dc:creator><description>&lt;p&gt;I am try with this example as well but get this output in log console.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;[00:00:00.282,897] &amp;lt;err&amp;gt; os: Data Access Violation&lt;br /&gt;[00:00:00.282,897] &amp;lt;err&amp;gt; os: MMFAR Address: 0x0&lt;br /&gt;[00:00:00.282,928] &amp;lt;err&amp;gt; os: r0/a1: 0x20000220 r1/a2: 0x20003b40 r2/a3: 0x20002880&lt;br /&gt;[00:00:00.282,928] &amp;lt;err&amp;gt; os: r3/a4: 0x00000000 r12/ip: 0x0000000e r14/lr: 0x000006ed&lt;br /&gt;[00:00:00.282,958] &amp;lt;err&amp;gt; os: xpsr: 0x01000000&lt;br /&gt;[00:00:00.282,989] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0000cff4&lt;br /&gt;[00:00:00.283,020] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 19: Unknown error on CPU 0&lt;br /&gt;[00:00:00.283,050] &amp;lt;err&amp;gt; os: Current thread: 0x20000870 (main)&lt;br /&gt;[00:00:00.540,985] &amp;lt;err&amp;gt; fatal_error: Resetting system&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/454538?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2023 18:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac32571b-abb2-4a15-8039-dc66179bc0ad</guid><dc:creator>Johnny Nguyen</dc:creator><description>&lt;p&gt;Does this help?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/audio/dmic"&gt;zephyr/samples/drivers/audio/dmic at main &amp;middot; zephyrproject-rtos/zephyr (github.com)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/454347?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2023 07:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f48d26a8-2a9d-4636-aadd-a95c3cce72a7</guid><dc:creator>Lokesh Mahajan</dc:creator><description>&lt;p&gt;Can you give me the idea how can you use the pdm instead of the i2s&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/450706?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2023 02:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cd0305a-d08f-4abe-a9c9-8324ae91e7cc</guid><dc:creator>leadrover</dc:creator><description>&lt;p&gt;I used a PDM microphone instead of the I2S interface.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/450183?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 04:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c50ef59-1f80-401a-8fbd-f11691f39484</guid><dc:creator>Lokesh Mahajan</dc:creator><description>&lt;p&gt;Thanks for your reply&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/leadrover"&gt;leadrover&lt;/a&gt;&amp;nbsp;Can you just give me idea which different interface you use to solve the problem, Because I can&amp;#39;t able to find the solution for doing that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/450141?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2023 18:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2c6c053-0dbe-4604-ac70-9babae3864ac</guid><dc:creator>leadrover</dc:creator><description>&lt;p&gt;G&amp;#39;day Lakesh,&lt;br /&gt;I did try to update the block count to be a multiple of the slab align value, but this did not resolve the issues I was having. I&amp;#39;ve also tried reducing the block size while increasing the block counts but this didn&amp;#39;t work either. Unfortunately I&amp;#39;ve not had the time I was hoping to have to just dive into this issue. I&amp;#39;ve switched to a different interface for what we needed and it just worked.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m open to other suggestions on how to fix this, but so far this still doesn&amp;#39;t work.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/450017?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2023 10:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0c4e679-94d7-4712-b680-789b45ae44b0</guid><dc:creator>Lokesh Mahajan</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am getting the same issue for my code. Are you able to solve the problem, If yes can you please share the solution.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/444297?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 11:03:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89219b70-c759-4328-8253-55eea2fcc2ac</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Welcome back!&lt;/p&gt;
&lt;p&gt;Let me know if the update works.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/443781?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 16:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2c8679b-98de-41b9-8d60-9d5d14178218</guid><dc:creator>leadrover</dc:creator><description>&lt;p&gt;Thanks Maria! Sorry for the delayed response I&amp;#39;ve been out of office. I&amp;#39;ll update my code and see if that resolves the issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/441839?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 11:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32f1143b-804d-48a6-920a-16f65fab51e9</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;Thank you for your patience.&lt;/p&gt;
[quote user="leadrover"]I&amp;#39;ve already got a block size of 35280 bytes, across 5 blocks.[/quote]
&lt;p&gt;According to the documentation for &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/memory_management/slabs.html#c.K_MEM_SLAB_DEFINE_STATIC"&gt;K_MEM_SLAB_DEFINE_STATIC&lt;/a&gt;, the block number (slab_num_blocks) needs to be a multiple of the memory slab&amp;#39;s buffer (slab_align) to. In your code I can see that slab_num_blocks = 5 and slab_align = 4. &lt;br /&gt;If you need the boundary alignment, you need to make sure that the block count is a multiple of slab_align. &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/439953?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2023 14:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d092fb5-184f-46ff-879e-92b1abf97ead</guid><dc:creator>leadrover</dc:creator><description>&lt;p&gt;Thanks for the suggestions Susheel, &lt;br /&gt;I&amp;#39;ve already got a block size of 35280 bytes, across 5 blocks. At this point it&amp;#39;s impractical for my application to have anything larger when I can use the PDM with significantly smaller blocks. I do want to understand why this isn&amp;#39;t working though. &lt;br /&gt;Do you have any additional suggestions into why I&amp;#39;m getting this error? I understand the stack size is not directly related, I was doing that just in-case there was a temporary buffer for handling the allocations that was being thrown on the stack during the process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 I2S microphone in Zephyr</title><link>https://devzone.nordicsemi.com/thread/439887?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2023 11:20:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcb3d737-136c-4ef0-a4ae-5c44385657b4</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Trevor,&lt;/p&gt;
[quote user=""]However, after the first memory block is filled (35280 bytes) the I2S clocks stop and I don&amp;#39;t get any more data. I do get IO errors, or failed to allocate next RX Buffer: -ENOMEM errors. I&amp;#39;ve tried to bump the thread memory, main processor memory, stack size for the thread but I&amp;#39;m missing something.[/quote]
&lt;p&gt;The unavailability of TX buffers have nothing to do with the Thread stack size. You need to increase the BLOCK_COUNT and probably BLOCK_SIZE to fit more_in_count/bigger incoming RX data while defining your mem_slab.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>