<?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>PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112302/pdm-channel-swapping-at-high-pdm-clock</link><description>Dear Nordic Team, I am currently working with 2 Infineon IM73D122V01 PDM Mems microphones to obtain stereo data, One is configured as left and the other is configured as right channel, To achieve better SNR, Infineon recommends using 3.072MHz PDM Clock</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Aug 2024 07:47:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112302/pdm-channel-swapping-at-high-pdm-clock" /><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/496542?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 07:47:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e82703b-e74e-49c8-b766-cd89ac5d5d34</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again Obaid&lt;/p&gt;
&lt;p&gt;So, as I feared this issue seems to be rooted in that the PDM clock frequency doesn&amp;#39;t support frequencies this high, and the highest configurable configuration is 1.33 MHz as per the PDM_CLK register and output sampling rate:&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/pastedimage1722498418658v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/495328?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2024 06:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a559093e-e32a-471f-94ba-a28d108875f6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Obaid&lt;/p&gt;
&lt;p&gt;I&amp;#39;m currently investigating the PDM clock frequency as 3.2MHz might be higher than what the PDM peripheral can handle reliably. Will let you know when I hear back internally on this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/494978?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 08:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f79e75-aee0-4f1d-bd89-69d06e872643</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Obaid,&lt;/p&gt;
&lt;p&gt;Just wanted to let you know that I&amp;#39;m back, but that I need to run these outputs by some devs internally before getting back to you with any further suggestions. Thank you for your patience. I&amp;#39;ll get back to you by end of week with another update.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/493625?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2024 12:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:728b6ec0-8f60-486b-80e8-096af063f1b7</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Obaid,&lt;/p&gt;
&lt;p&gt;Simon is unfortunately out of office at the moment. He will return after next week and continue to help you.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/492872?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 06:56:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acfaf989-e2b9-4443-9c71-5a873735c6b8</guid><dc:creator>Obaid ur Rehman</dc:creator><description>&lt;p&gt;HI Simonr sorry for the late reply,&amp;nbsp;&lt;br /&gt;I have captured the oscilloscopes outputs for both cases, In all the images the red graph is clock and blue graph is data line,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Here is the output of the oscilloscope for 1.2MHz clock with 1us divisions&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/data-and-clock-at-1.2MHz-clock-with-1us-division.png" /&gt;&lt;/p&gt;
&lt;p&gt;I have also captured the result at 200ns division for 1.2MHz clock&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/data-and-clock-at-1.2MHz-clock-with-200ns-division.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Similarly here is the output for 3.2MHz clock with 1us division&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/data-and-clock-at-3.2MHz-clock-with-1us-division.png" /&gt;&lt;br /&gt;and here is the output at 200ns Division for 3.2MHz clock&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/data-and-clock-at-3.2MHz-clock-with-200ns-division.png" /&gt;&lt;br /&gt;&lt;br /&gt;I have also uploaded the complete logs on google drive as i cannot upload the files here, so if you want to view the complete logs you can use this&amp;nbsp;&lt;a href="https://drive.google.com/drive/folders/1nQ2M2aa5PDnwNUad_95qOva95m5nPis_?usp=sharing"&gt;Google Drive&lt;/a&gt;&amp;nbsp;Link.&lt;br /&gt;Please note that you need picoscope software to view the logs.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/490786?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 08:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:810d2f08-3a34-4f80-bad8-0b441dc2a54b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again Obaid&lt;/p&gt;
&lt;p&gt;Okay, thank you for the clarification. It seems very strange that it would swap like this. Would it be possible for you to use a scope to check the left-right word alignment for both scenarios so we can see if this is the driver that messes up or what. I have asked a bit around but we can&amp;#39;t recall seeing this issue in the past unfortunately.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/490284?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 12:29:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51b7d41d-0316-4056-afe9-fa6bca0f135f</guid><dc:creator>Obaid ur Rehman</dc:creator><description>&lt;p&gt;Hi, so nothing is wrong with any channels in term of sensitivity or volume, both mics work correctly, however at 3.2MHz the PCM data containing the left and right channel pairs is swapped so when i separate them and plot the STFTs of each channel the Left channel data actually contains the right channel data and vice versa.&amp;nbsp;&lt;br /&gt;To further explain the issue here is an experiment&amp;nbsp;I did.&lt;br /&gt;1. I intentionally made the Left channel Deaf (Covered the Left mic with glue so that its sensitivity will be really low).&lt;br /&gt;2. I took a stereo recording at PDM clock 1.2MHz where&amp;nbsp;I played a 500Hz tone on speaker and plot the STFT of Left and right channel.&lt;/p&gt;
&lt;p&gt;3. As expected the left channel is Deaf and the Right channel shows a 500Hz Freq.&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/1_5F00_28_5F00_STFT-deaf.png" /&gt;&lt;/p&gt;
&lt;p&gt;4. I repeated the experiment with PDM clock 3.2Mhz, with the same setup (Left mic covered with glue and played a 500 Hz tone).&lt;br /&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/3_5F00_2_5F00_STFT-deaf.png" /&gt;&lt;br /&gt;5. This time the channels have swapped, instead of getting a straight line on the Right channel,&amp;nbsp;I am getting the Line in Left channel . (Left channel was supposed to be deaf and should have nothing in the STFT).&lt;br /&gt;So the data is correct however it is Swapped at 3.2 MHz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/490259?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 11:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49fbeeb4-963d-499c-9fe0-6334e578b2d9</guid><dc:creator>Obaid ur Rehman</dc:creator><description>&lt;p&gt;Hi Simonr, Thank you for the reply,&amp;nbsp;I am using&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpdm.html&amp;amp;cp=2_2_0_42"&gt;PDM Library&lt;/a&gt;&amp;nbsp;by Nordic, and&amp;nbsp;I am using NRF5SDK v17.1.0&lt;br /&gt;here is my configuration&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t err_code;
uint32_t clk_freq = 0x19000000;
nrfx_pdm_config_t config = NRFX_PDM_DEFAULT_CONFIG(PDM_CONFIG_IO_PDM_CLK, PDM_CONFIG_IO_PDM_DATA);
config.gain_l = rec_config.gain;
config.gain_r = rec_config.gain;
config.clock_freq = ( nrf_pdm_freq_t )(clk_freq);
config.edge = PDM_MODE_EDGE_LeftFalling;
config.mode = PDM_MODE_OPERATION_Stereo;
// set ratio to 80x
NRF_PDM-&amp;gt;RATIO = 1;

err_code = nrfx_pdm_init(&amp;amp;config, PDM_drv_pdm_handler);
APP_ERROR_CHECK(err_code);
err_code = nrfx_pdm_start();
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/490237?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 11:15:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9349dde5-6d19-483c-9966-4e2c67fe67a3</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t seen this exact issue before, so exactly what is causing the left channel to be off is a bit of guesswork. Could it be that using PPI would help out here perhaps as is recommended for the ADC available &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20291/offset-in-saadc-samples-with-easy-dma-and-ble/79053#79053"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you provide some more details about what exactly is wrong on the left channel, is the sound higher or just the sensitivity so the output audio is incorrect?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PDM Channel swapping at High PDM clock</title><link>https://devzone.nordicsemi.com/thread/490146?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 06:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3699e5c2-0df5-4f06-9eec-3d6cb1b706e6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just letting you know that we&amp;#39;re currently looking into this issue. What library/driver are you using for PDM here, and what version of the SDK are you using exactly?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>