<?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>I2S to USB microphone received data is periodically garbage (nRF Connect SDK v2.6.1)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112620/i2s-to-usb-microphone-received-data-is-periodically-garbage-nrf-connect-sdk-v2-6-1</link><description>Hi, 
 
 I&amp;#39;m trying to use an nRF52840 dev kit as an I2S-to-USB microphone, but I&amp;#39;ve been running into a problem where the recorded audio is periodically unusable. 
 To debug, I connected another nRF52840 dev kit to act as an I2S slave. It simply delivers</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Jul 2024 19:14:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112620/i2s-to-usb-microphone-received-data-is-periodically-garbage-nrf-connect-sdk-v2-6-1" /><item><title>RE: I2S to USB microphone received data is periodically garbage (nRF Connect SDK v2.6.1)</title><link>https://devzone.nordicsemi.com/thread/492331?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2024 19:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e78871a7-3712-42f1-a294-4f65603d8aa6</guid><dc:creator>Malek Itani</dc:creator><description>&lt;p&gt;Apologies for the oversight and thank you for your help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will refer to&amp;nbsp;the DK that&amp;nbsp;relays I2S samples to USB&amp;nbsp;as DK1, and to the other one&amp;nbsp;as DK2. I connect pins together with jumper cables. Specifically, I connect:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.26 on DK1 to P0.26 on DK2 (SCK&amp;nbsp;to SCK)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.27 on DK1 to P0.27 on DK2 (LRCK&amp;nbsp;to LRCK)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;P1.08 on DK1 to P1.08 on DK2 (SDIN to SDOUT)&lt;/p&gt;
&lt;p&gt;GND of DK1 to&amp;nbsp;GND of DK2&lt;/p&gt;
&lt;p&gt;Both DKs are powered over the microUSB&amp;nbsp;connector at the short edge of the board.&amp;nbsp;I connect my host PC to DK1 over the other microUSB connector as well to interface with the USB audio device.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this helps. Let me know if you need any other information.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: After reading a bit more, it might be related to the fact that the nRF52 can&amp;#39;t provide an exact 48kHz sampling rate. In Zephyr, the default sampling rate for the USB Audio Device Class is 48kHz, but there should be a way to change it. Howver,&amp;nbsp;I believe this functionality was added in v3.6, while nRF Connect SDK v2.6.1 uses Zephyr v3.5.&lt;/p&gt;
&lt;p&gt;If I change the I2S sampling rate to a frequency that *can* be generated by the I2S module, like 8kHz, I don&amp;#39;t observe these spikes anymore, though as expected recording happens 6 times slower (because the USB device thinks it&amp;#39;s running at 48kHz, when really its providing samples at 8kHz).&lt;/p&gt;
&lt;p&gt;Is my reasoning&amp;nbsp;correct here? Are there any possible workarounds?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2S to USB microphone received data is periodically garbage (nRF Connect SDK v2.6.1)</title><link>https://devzone.nordicsemi.com/thread/492139?ContentTypeID=1</link><pubDate>Wed, 03 Jul 2024 22:47:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccfc4309-a2f4-4f96-b0a0-2ef85f5e4285</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user=""]I&amp;#39;ve attached the project files for both dev boards for reference.[/quote]
&lt;p&gt;Could you add a explanation on how you connect the 2 DKs together?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>