<?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 interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106484/pdm-interfcae-with-nrf5340-and-live-data-transfer</link><description>Hello, I am using a NRF5340 with an IM69D120 mic. I want to record the audio and send it while recording. 
 Majorly, I want to know: how should i configure my pdm clock to achieve this? How should I add my gain to it? 
 
 What should the connection speed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Dec 2023 20:23:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106484/pdm-interfcae-with-nrf5340-and-live-data-transfer" /><item><title>RE: pdm interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/thread/460222?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2023 20:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23a8e81c-3d54-46d1-9506-173665262b3a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Let us continue this discussion in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106543/pdm-clock-for-bandwidth-20--2-khz"&gt;your other open ticket on the matter&lt;/a&gt;&amp;nbsp;so as to not duplicate the questions and information.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pdm interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/thread/460045?ContentTypeID=1</link><pubDate>Wed, 13 Dec 2023 05:05:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f5c35af-d5e4-4691-b004-a565ade8b08f</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;hi &lt;a href="https://devzone.nordicsemi.com/members/karl-ylvisaker"&gt;Karl Ylvisaker&lt;/a&gt;&amp;nbsp; any inputs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pdm interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/thread/459828?ContentTypeID=1</link><pubDate>Tue, 12 Dec 2023 05:26:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa1c5fb-d1a7-420b-a559-d75faca7130a</guid><dc:creator>manikandan</dc:creator><description>&lt;p style="color:#252525;"&gt;Hi, thanks for your reply.&lt;/p&gt;
&lt;p style="color:#252525;"&gt;Our requirement is a 512 kHz clock with a sampling frequency of 4 kHz and a decimination ratio of 128.&lt;/p&gt;
&lt;p style="color:#252525;"&gt;1) Is it possible to set the NRF_PDM0-&amp;gt;PDMCLKCTRL register to 512 KHZ? If yes, what would be the NRF_PDM0-&amp;gt;PDMCLKCTRL register value? And how are we calculating it?&lt;/p&gt;
&lt;p style="color:#252525;"&gt;2)I have seen this document: &lt;a style="color:#252525;" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fpdm.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fpdm.html&lt;/a&gt; Only ratio 40 and 80 were used. Is this the only possible decimination ratio that can be used? If not, how can I set the ratio in this register, NRF_PDM0-&amp;gt;RATIO? ie:128&lt;/p&gt;
&lt;p style="color:#252525;"&gt;3)I have attached distorted audio file&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/audio.wav"&gt;devzone.nordicsemi.com/.../audio.wav&lt;/a&gt; kindly check.&lt;/p&gt;
&lt;p style="color:#252525;"&gt;Regards,&lt;/p&gt;
&lt;p style="color:#252525;"&gt;Manikandan V&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pdm interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/thread/459740?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2023 15:04:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6000b8b6-80ca-4d64-be48-ec3bbe0409c5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Manilkandan V,&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;/div&gt;
&lt;div&gt;How is the PDM clock genrated in the below calculation?&lt;/div&gt;[/quote]
&lt;p&gt;In that example it is using the 32 MHz crystal for the clock source.&lt;/p&gt;
[quote user=""]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set 1280kHz frequency&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_PDM0-&amp;gt;PDMCLKCTRL = 0x0A000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set factor of 80 to get 16kHz sampling frequency&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NRF_PDM0-&amp;gt;RATIO = 1[/quote]
&lt;p&gt;I notice that you are writing to the registers directly here, is this a requirement for your application or could it be an alternative to&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/pdm/driver.html"&gt; use the nrfx pdm driver instead&lt;/a&gt;? I would recommend using the driver over the register manipulation approach.&lt;/p&gt;
[quote user=""]currently&amp;nbsp;mic is working at 1280khz frequency but audio seems to distorted?[/quote]
&lt;p&gt;Could you describe this distortion - is it a constant noise, like a filter or offset, an intermitting distortion, or audiable artifacts like clicks and pops?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pdm interfcae with nrf5340 and live data transfer</title><link>https://devzone.nordicsemi.com/thread/459628?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2023 06:10:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7983f28b-61bb-4b64-acb3-b9985360ed88</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;any inputs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>