<?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>Accessing I2S mic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115326/accessing-i2s-mic</link><description>Hi,I have been using nrf5340 audio DK Board to access the I2S .I am using SPH0645 mic with that i need to get mic data .I am getting mic data continuously but sure that I am not getting correct data.I have checked with clock SCK 1.024 MHz and LRCL of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jan 2025 13:04:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115326/accessing-i2s-mic" /><item><title>RE: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/518845?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2025 13:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc0c4292-9332-4794-a851-acb0660f9d78</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;My apologies for the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you made any progress since your last reply?&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: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/506576?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 18:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d810aa99-eb3f-4834-9a1f-031efc31d505</guid><dc:creator>Kashyap23</dc:creator><description>&lt;p&gt;Hi,I checked without configuring any MCKFREQ , When I am doing debugging I can see MCKFREQ register has the value&amp;nbsp; of 343597056.Is it compulsary to configure as it&amp;#39;s showing the required value for respected SCK and LRCK.I think it&amp;#39;s internally configured based on sampling frequency and bit width, when I am changing those I can see change in MCKFREQ value.And in final this may not be issue of getting wrong data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/506340?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2024 14:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13751475-ba60-4600-a616-d417cae653e0</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Thank you for sharing the new overlay file. It looks correct.&lt;/p&gt;
&lt;p&gt;I suspect the missing piece is to configure the MCK in the source code. This is not possible with the Zephyr I2S API, but can be done by setting the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/i2s.html#ariaid-title34"&gt;CONFIG.MCKFREQ&lt;/a&gt; register. You can compute the value with the MCKFREQ equation (Figure 3.) from the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/i2s.html#ariaid-title6"&gt;Master Clock section&lt;/a&gt; of the I2S peripheral and for f&lt;sub&gt;MCK&lt;/sub&gt; = 1.024 MHz and f&lt;sub&gt;source&lt;/sub&gt; = 12.288 MHz the MCKFREQ value is 343597056 or 0x147AE000 this value can also be found in row four in the table I sent previously.&lt;/p&gt;
&lt;p&gt;Please see&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/103711/zephyr-i2s-driver-mclk-and-i2s_state?ReplyFilter=Answers&amp;amp;ReplySortBy=Answers&amp;amp;ReplySortOrder=Descending"&gt;this reply&lt;/a&gt; from my colleague on a previous case for further considerations when configuring MCK.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to set the register directly you can use the &lt;a href="https://docs.nordicsemi.com/bundle/nrfx-apis-latest/page/group_nrfx_i2s.html"&gt;nrfx: I2S driver&lt;/a&gt; to configure MCK. The result from the MCKFREQ equation is used as the mck_setup here as well, see the configuration from the nRF5340 Audio application &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/applications/nrf5340_audio/src/modules/audio_i2s.c#L43"&gt;here&lt;/a&gt; for reference.&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: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/506261?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2024 09:59:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c223d7d6-67d0-4bdd-9011-45bcc9440547</guid><dc:creator>Kashyap23</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;pinctrl&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i2s0_default:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i2s0_default&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SCK_M&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;26&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_LRCK_M&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;25&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SDIN&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;7&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SDOUT&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;6&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i2s0_sleep:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i2s0_sleep&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SCK_M&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;26&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_LRCK_M&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;25&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SDIN&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;7&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;I2S_SDOUT&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;6&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;clock&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;hfclkaudio-frequency&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;12288000&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;i2s_rxtx&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;i2s0&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;okay&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-0&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;i2s0_default&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;i2s0_sleep&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;clock-source&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;ACLK&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;pinctrl-names&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;default&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;&amp;quot;sleep&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;By using this I can get SCLK==1.024MHz and LRCK=16kHz.&lt;/div&gt;
&lt;div&gt;Is there relation b/w&amp;nbsp;&lt;span&gt;hfclkaudio-frequency&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;span&gt;12288000&lt;/span&gt;&lt;span&gt;&amp;gt; and SCLK,LRCK .As if I am removing the&amp;nbsp;&amp;nbsp;hfclkaudio-frequency&amp;nbsp; in overlay file,I able to get SCLK as 1.024MHz and LRCK =16kHz&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/506246?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2024 08:16:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd82c16e-ee4f-4c3f-a70c-6e9b29525654</guid><dc:creator>Maria Gilje</dc:creator><description>[quote user="Kashyap23"]To be mentioned that is not the updated datasheet [/quote]
&lt;p&gt;Thank you for letting me know. I see that the frequency range is updated in the new revision to include 1024 kHz.&lt;/p&gt;
[quote user="Kashyap23"]Does the ACLK clock implementation\configuration correct?[/quote]
&lt;p&gt;The new values looks to be correct in your written sentence. Please share your updated .overlay so I can verify that the configuration is correct there as well.&lt;/p&gt;
&lt;p&gt;In your previous overlay, the clock node is missing &lt;code&gt;status = &amp;quot;okay&amp;quot;;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also, have you investigated the timings as mentioned before?&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: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/505990?ContentTypeID=1</link><pubDate>Sun, 13 Oct 2024 13:15:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f0a5c66-be4c-4517-be5d-2fce428bdb7f</guid><dc:creator>Kashyap23</dc:creator><description>&lt;p&gt;To be mentioned that is not the updated datasheet .The datasheet you are referring is REV-B but updated one is REV-C.As per updated datasheet I am using sampling rate as 16000 and Ratio 64x and source frequency 12288000 but data is not&amp;nbsp; coming correctly .Does the ACLK clock implementation\configuration correct?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_10_2D00_13-184003.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Accessing I2S mic</title><link>https://devzone.nordicsemi.com/thread/505724?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2024 12:20:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b56e9799-097e-4b8a-87a3-996b6104ac7b</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Kashyap,&lt;/p&gt;
&lt;p&gt;Please check the that these requirements from the&amp;nbsp;&lt;a href="https://cdn-shop.adafruit.com/product-files/3421/i2S+Datasheet.PDF"&gt;SPH0645 datasheet&lt;/a&gt; are met:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728558110046v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The screenshot is from page 8.&lt;/p&gt;
&lt;p&gt;From the datasheet I found that having SCK/BCLK below 2.048 kHz is out of spec for the microphone. &lt;/p&gt;
&lt;p&gt;You can check the timings with a logic analyser, for example.&lt;/p&gt;
&lt;p&gt;Based on the datasheet for the SPH0645 and nRF5340 SoC, a possible configuration to use is marked in yellow here:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728561433698v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The table is from the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/i2s.html#ariaid-title8"&gt;Configuration examples&lt;/a&gt; section of the I2S peripheral for the nRF5340.&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></channel></rss>