<?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>Issues interfacing I2S MP34DT05 with nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75036/issues-interfacing-i2s-mp34dt05-with-nrf52840</link><description>Hello, 
 I am currently interfacing MP34DT05 with nRF52840 using I2S protocol. I have tried using nrfx I2S drivers but it gives me initialization error. I have used the sample code given as the solution in the following link as reference, but cant make</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 May 2021 17:24:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75036/issues-interfacing-i2s-mp34dt05-with-nrf52840" /><item><title>RE: Issues interfacing I2S MP34DT05 with nRF52840</title><link>https://devzone.nordicsemi.com/thread/311586?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 17:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee5c8b2e-0ae0-4b99-bc44-85e21a59fc7c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry, I didn&amp;#39;t realize until now that&amp;nbsp;&lt;span&gt;MP34DT05&amp;nbsp;outputs PDM data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You should use the API&amp;nbsp;&lt;em&gt;modules\hal\nordic\nrfx\drivers\include\nrfx_pdm.h&lt;/em&gt; to receive PDM data, not the API&amp;nbsp;modules\hal\nordic\nrfx\drivers\include\nrfx_i2s.h.&lt;/p&gt;
&lt;p&gt;By the way, it seems like you&amp;#39;re getting good help here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75483/nrfx-based-pdm-to-pcm-implementation-i2s-example"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/75483/nrfx-based-pdm-to-pcm-implementation-i2s-example&lt;/a&gt;. Should we close this ticket?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues interfacing I2S MP34DT05 with nRF52840</title><link>https://devzone.nordicsemi.com/thread/310238?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 16:07:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68897272-ca34-4539-a88b-4e4658505109</guid><dc:creator>Simon</dc:creator><description>[quote user="Nikhil D&amp;amp;K"]First of all the return error code from I2S init function gives me NRF_SUCCESS but than also it executes the if loop and print Init error.[/quote]
&lt;p&gt;I guess you mean&amp;nbsp;NRFX_SUCCESS? This doesn&amp;#39;t make sense to me. If you get an NRFX_SUCCESS, the line&amp;nbsp;&lt;code&gt;printk(&amp;quot;I2S init error: %d\n&amp;quot;, err_code);&lt;/code&gt; should &lt;span style="text-decoration:underline;"&gt;not&lt;/span&gt; get printed. Can you modify&amp;nbsp;nrfx_i2s_init() like I showed in my first answer, then open &lt;a href="https://www.compuphase.com/software_termite.htm"&gt;Termite&lt;/a&gt;&amp;nbsp;and run the code, and copy the result into this ticket.&lt;/p&gt;
[quote user="Nikhil D&amp;amp;K"]When i open the declaration for, NRF_SUCCESS, the whole file is in light gray color as its not enabled.[/quote]
&lt;p&gt;I guess you mean&amp;nbsp;NRFX_SUCCESS here as well? I&amp;#39;m not sure why it&amp;#39;s gray, maybe there is something wrong with the IDE or something? If the define NRFX_SUCCESS is not found you should get an error during the &lt;a href="https://www.techonthenet.com/c_language/compiling_linking.php"&gt;preprocessor phase&lt;/a&gt;&amp;nbsp;and you would not be able to build the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues interfacing I2S MP34DT05 with nRF52840</title><link>https://devzone.nordicsemi.com/thread/309515?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 13:06:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8af7ad07-2157-43c0-9594-cf68ee5792fa</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I guess it fails here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfx_err_t err_code = nrfx_i2s_init(&amp;amp;config, data_handler); //I assume this fails
if (err_code != NRFX_SUCCESS)
{
	printk(&amp;quot;I2S init error\n&amp;quot;);                              //and this gets printed
	return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could you modify the code in the following manner, to check what error code nrfx_i2s_init() returns:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfx_err_t err_code = nrfx_i2s_init(&amp;amp;config, data_handler); 
if (err_code != NRFX_SUCCESS)
{
	printk(&amp;quot;I2S init error: %d\n&amp;quot;, err_code); //Modify this: Print error code
	return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Check whether the error code is &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/8f013ea950f41bf69b18bf688bfb0dd80a3fdc44/nrfx/drivers/nrfx_errors.h#L58"&gt;NRFX_ERROR_INVALID_STATE&lt;/a&gt;&lt;span&gt;&amp;nbsp;or &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/8f013ea950f41bf69b18bf688bfb0dd80a3fdc44/nrfx/drivers/nrfx_errors.h#L57"&gt;NRFX_ERROR_INVALID_PARAM&lt;/a&gt;. Then take a look at the &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/8f013ea950f41bf69b18bf688bfb0dd80a3fdc44/nrfx/drivers/include/nrfx_i2s.h#L202-L203"&gt;nrfx_i2s_init() function description&lt;/a&gt; what the error means.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>