<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HWVAD Example for RT1170 in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1542042#M22172</link>
    <description>Hello,&lt;BR /&gt;can you please tell, how the noise filter from HWVAD affects PDM? Can it reduce background noise on recording sound?&lt;BR /&gt;I tried your file with different settings of noiseFilterConfig but I guess HWVAD just not worked for me.&lt;BR /&gt;Thanks</description>
    <pubDate>Fri, 21 Oct 2022 15:04:12 GMT</pubDate>
    <dc:creator>Burjak</dc:creator>
    <dc:date>2022-10-21T15:04:12Z</dc:date>
    <item>
      <title>HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1408335#M18198</link>
      <description>&lt;P&gt;Is there an example for enabling the HWVAD on the RT117x? I see the API in the PDM driver, but I'm unable to get an interrupt to fire using the recommended settings defined in fsl_pdm.h. Assuming the clocks and channels are already configured (I can capture properly with PDM EDMA transfer) My thought was something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void AudioTask::HandleEnableVoiceDetection(SetCallbackRequest&amp;amp; set_callback) {
    const pdm_hwvad_config_t hwvadConfig = {
        .channel           = 0,
        .initializeTime    = 10U,
        .cicOverSampleRate = 0U,
        .inputGain         = 0U,
        .frameTime         = 10U,
        .cutOffFreq        = kPDM_HwvadHpfBypassed,
        .enableFrameEnergy = false,
        .enablePreFilter   = true,
    };

    const pdm_hwvad_noise_filter_t noiseFilterConfig = {
        .enableAutoNoiseFilter = false,
        .enableNoiseMin        = true,
        .enableNoiseDecimation = true,
        .enableNoiseDetectOR   = true,
        .noiseFilterAdjustment = 0U,
        .noiseGain             = 7U,  
    };
    
    PDM_SetHwvadInEnvelopeBasedMode(PDM, &amp;amp;hwvadConfig, &amp;amp;noiseFilterConfig, nullptr, 0);
    PDM_EnableHwvadInterrupts(PDM, kPDM_HwvadInterruptEnable | kPDM_HwvadErrorInterruptEnable);
    voice_callback_ = set_callback.callback;
    voice_callback_param_ = set_callback.callback_param;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to match what the reference manual says looking into the SetHwvadInEnvelopeBasedMode function. Am I missing something obvious? Is there a driver example of this in action?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1408335#M18198</guid>
      <dc:creator>mrbrooks</dc:creator>
      <dc:date>2022-02-02T22:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1411570#M18272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/149796"&gt;@mrbrooks&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I've asked to SDK team. I'll let you know as soon as I get answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 06:32:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1411570#M18272</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-02-10T06:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1412615#M18297</link>
      <description>&lt;P&gt;HI Michael,&lt;/P&gt;
&lt;P&gt;I guess the issue is with&amp;nbsp;signalGain (VADSGAIN in VAD0_SCONFIG register) value passed as last parameter to API&amp;nbsp;PDM_SetHwvadInEnvelopeBasedMode. I think you are passing a value of 0 which is gain value of 1 and you have used a noisegain (VADNGAIN&amp;nbsp; in VAD0_NCONFIG register) value of 7 inside structure noiseFilterConfig .&lt;/P&gt;
&lt;P&gt;According to RM:&lt;/P&gt;
&lt;P&gt;56.3.6.7.5 Filter Result Gain Setting&lt;BR /&gt;There are two gain adjustment controls, one for the estimated noise (VADNGAIN) and&lt;BR /&gt;another for signal estimated (VADSGAIN). Both gain adjustments outputs are compared,&lt;BR /&gt;the comparison result determines whether or not there is voice in the channel.&lt;/P&gt;
&lt;P&gt;I extended the pdm_sai_edma SDK example to add your below code and also added code to enable IRQ for HWVAD and get IRQ handler callback at application level. As soon as, I changed signalGain parameter to a value greater than or equal to&amp;nbsp;noisegain (7), I was able to hit breakpoint in my IRQ handler for HWVAD. I also checked that if I reduce the value for&amp;nbsp;noisegain , I could achieve the same results. Can you please try to change the value and see if you are still getting this issue?&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61241"&gt;@jingpan&lt;/a&gt;&amp;nbsp;Can you please confirm from R&amp;amp;D , if there is any recommendation against VADSGAIN in VAD0_SCONFIG register and&amp;nbsp;VADNGAIN&amp;nbsp; in VAD0_NCONFIG register?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Shweta&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 20:56:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1412615#M18297</guid>
      <dc:creator>shweta_chauhan</dc:creator>
      <dc:date>2022-02-11T20:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1412875#M18317</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/114458"&gt;@shweta_chauhan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes my testing result is same with yours.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 06:11:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1412875#M18317</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2022-02-14T06:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1414675#M18382</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/114458"&gt;@shweta_chauhan&lt;/a&gt;&amp;nbsp;: Thanks - this is great insight. I haven't been able to get an interrupt to fire in my application code, but I'm working on porting the pdm_sai_edma example to our board. Can you provide a patch of the changes you made to get the HWVAD working in this example?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61241"&gt;@jingpan&lt;/a&gt;&amp;nbsp;: Please let me know if the R&amp;amp;D has recommendations on gain settings. It would seem that N+1 is probably not enough to properly gauge signal vs noise, but this is likely application specific.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 18:48:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1414675#M18382</guid>
      <dc:creator>mrbrooks</dc:creator>
      <dc:date>2022-02-16T18:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1414723#M18383</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;PFA the pdm_sai_edma.c file here which was modified for adding HWVAD related changes, this is the only file changed w.r.t pdm_sai_edma SDK example.&lt;/P&gt;
&lt;P&gt;Note that the values in actual product will differ based on the usecase and this code was used just to check API and to see if application can receive HWVAD interrupt or not.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Shweta&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 19:19:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1414723#M18383</guid>
      <dc:creator>shweta_chauhan</dc:creator>
      <dc:date>2022-02-16T19:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: HWVAD Example for RT1170</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1542042#M22172</link>
      <description>Hello,&lt;BR /&gt;can you please tell, how the noise filter from HWVAD affects PDM? Can it reduce background noise on recording sound?&lt;BR /&gt;I tried your file with different settings of noiseFilterConfig but I guess HWVAD just not worked for me.&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 21 Oct 2022 15:04:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/HWVAD-Example-for-RT1170/m-p/1542042#M22172</guid>
      <dc:creator>Burjak</dc:creator>
      <dc:date>2022-10-21T15:04:12Z</dc:date>
    </item>
  </channel>
</rss>

