<?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>how schedule other thread when PDM interrupt occurs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114619/how-schedule-other-thread-when-pdm-interrupt-occurs</link><description>HI ，Nordic 
 Currently I am trying to get voice data via DMIC on NRF52840DK and send it out via BLE after OPUS encoding, but I am having trouble: nrfx_pdm_start keeps triggering nrfx_pdm_irq_handler, which causes my other threads to be unable to be scheduled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Sep 2024 09:17:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114619/how-schedule-other-thread-when-pdm-interrupt-occurs" /><item><title>RE: how schedule other thread when PDM interrupt occurs</title><link>https://devzone.nordicsemi.com/thread/502576?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2024 09:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d647df8-6e4a-4dc2-aab4-01d17ec8e41d</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For this application logic design, it is really hard to give suggestions with simple words in this discussion, so we have application samples for your reference.&lt;/p&gt;
&lt;p&gt;Your application is quite similar to&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/applications/nrf5340_audio/index.html"&gt;nRF5340 Audio applications (nordicsemi.com)&lt;/a&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/applications/nrf5340_audio/index.html"&gt;,&lt;/a&gt;&amp;nbsp;nrf/applications/nrf5340_audio/src/audio&amp;nbsp;properly shows the audio data sources and flow management including&amp;nbsp;DMIC as source before it is&amp;nbsp;processed by LC3 code and BLE audio transceiver. You can try to port this part and reuse it for your BLE+Opus application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how schedule other thread when PDM interrupt occurs</title><link>https://devzone.nordicsemi.com/thread/502212?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2024 03:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b75c1569-1a8c-4ea6-924e-ee683518f1d6</guid><dc:creator>Jon-Yang</dc:creator><description>&lt;p&gt;HI ，Charlie&lt;/p&gt;
&lt;p&gt;Thanks a lot for your advice , I will try this method.&lt;/p&gt;
&lt;p&gt;Since I need to capture PCM data every 10 milliseconds, do you mean I need a timer and then read the data every 10 milliseconds?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you give me more suggestions?&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp; a lot .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how schedule other thread when PDM interrupt occurs</title><link>https://devzone.nordicsemi.com/thread/502110?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 12:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4450e4b-7d9d-44d5-874a-8b90f4e98192</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Yangbin,&lt;/p&gt;
&lt;p&gt;Is your project based on NCS/Zephyr or nRF5 SDK?&lt;/p&gt;
&lt;p&gt;Have you referred to&amp;nbsp;this sample&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/d066e02a743b6090ec276c22af03184b10b9aa8c/samples/drivers/audio/dmic"&gt;sdk-zephyr/samples/drivers/audio/dmic at d066e02a743b6090ec276c22af03184b10b9aa8c · nrfconnect/sdk-zephyr (github.com)&lt;/a&gt;? In this sample you use dmic driver which on top of nrfx pdm, so you do not need to deal with interrupts directly.&lt;/p&gt;
&lt;p&gt;Hardware interrupts have high priory than threads, you can learn about Preventing Interruptions in certain situations from&amp;nbsp;&lt;span style="font-family:inherit;"&gt;&lt;a href="https://docs.zephyrproject.org/latest/kernel/services/interrupts.html#preventing-interruptions"&gt;Interrupts — Zephyr Project Documentation&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>