<?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: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448869#M26578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for catching that error, Nehal.&amp;nbsp; It turned out, in addition to this error, I also had my codec configured incorrectly.&amp;nbsp; The bit alignment was off, causing the sign bit to be shifted by one.&amp;nbsp; Thish caused the random seeming noise and roll over observed when I applied the fir filter.&amp;nbsp; After correcting the error you found and correcting the codec configuration all is working.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2015 15:35:07 GMT</pubDate>
    <dc:creator>aaroncramer</dc:creator>
    <dc:date>2015-07-20T15:35:07Z</dc:date>
    <item>
      <title>Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448866#M26575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Hello Kinetis users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;I am fairly new to Kinetis and brand new to CMSIS-DSP.&amp;nbsp; I am trying to use the CMSIS-DSP arm_fir_q31 library function to filter an audio signal.&amp;nbsp; When I try to use the arm_fir_q31 function I get an output signal with a lot of noise as shown below.&amp;nbsp; When I remove the arm_fir_q31 function and just do a pass through, the signal looks ok.&amp;nbsp; It also looks ok when I use the arm_negate_q31 function and I do see the negation.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Noisy output with arm_fir_q31 enabled.&amp;nbsp; (Yellow=input, Green=output)&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="scope_6.bmp"&gt;&lt;IMG alt="scope_6.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/37697i7BBB1FBFE031C884/image-size/large?v=v2&amp;amp;px=999" title="scope_6.bmp" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;ok output signal with arm_fir_q31 disabled.&amp;nbsp; &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;(Yellow=input, Green=output)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="scope_5.bmp"&gt;&lt;IMG alt="scope_5.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/9949i6DB102D01F196F06/image-size/large?v=v2&amp;amp;px=999" title="scope_5.bmp" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Here are the details of my system:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Kinetis K70 MCU in tower system&lt;/LI&gt;&lt;LI&gt;Custom tower module with TI TLV320AIC3007 CODEC, configured as I2S slave, 48kHz sample rate, 24bit samples packed in 32 bit words&lt;/LI&gt;&lt;LI&gt;I2S communication between Codec and K70.&lt;/LI&gt;&lt;LI&gt;DMA handles data transfer in "ping-pong" buffering scheme.&amp;nbsp; 512 samples per block, stereo audio data.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The things I am unsure about are the conversion from raw ADC samples received over I2S (24 bit unsigned ADC value packed in 32 bit unsigned int) to Q31 format and the conversion back from Q31 to unsigned 24 bit value packed in 32 bit unsigned int after processing through arm_fir_q31 function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is my method correct for converting the raw ADC samples received from the codec to Q31 format? (lines 08 - 17)&lt;/LI&gt;&lt;LI&gt;Is my method correct for converting from Q31 format back to a 24 bit unsigned value? (lines 26 - 35)&lt;/LI&gt;&lt;LI&gt;Do you see where I am going wrong?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function called when I2S Rx buffer is filled.&amp;nbsp; It converts raw samples to Q31, calls arm_fir_q31 function to process data block, converts back to 24 bit unsigned samples, and loads in I2S Tx buffer.&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14339761177785035 jive_text_macro" data-renderedposition="956.2000122070312_8_1232_640" jivemacro_uid="_14339761177785035"&gt;&lt;P&gt;void vfnAudioBufferHandler_DMARxCallback (void){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static u8 bufIndx = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u16 i,j;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PSOR |= 0x8000;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //debug bit, PTA15 Set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //convert to Q31 format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;AUDIO_NUM_CHANNELS;i++){&amp;nbsp; //loop through channels&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(j=0;j&amp;lt;AUDIO_SAMPLES_PER_BLOCK;j++){ //loop through samples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(RxDMABuffer[i][bufIndx].samples[j] &amp;amp; 0x0080000){ //bit 23 is set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q31RxDMABuffer[i][bufIndx].samples[j] = RxDMABuffer[i][bufIndx].samples[j] &amp;amp; ~0xFF800000; //invert bit 23, sign extend zeros&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&amp;nbsp;&amp;nbsp; //bit 23 is clear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q31RxDMABuffer[i][bufIndx].samples[j] = RxDMABuffer[i][bufIndx].samples[j] | 0xFF800000; //invert bit 23, sign extend ones&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;AUDIO_NUM_CHANNELS;i++){&lt;/P&gt;&lt;P&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arm_negate_q31(&amp;amp;q31RxDMABuffer[i][bufIndx].samples[0], &amp;amp;q31TxDMABuffer[i][bufIndx].samples[0],AUDIO_SAMPLES_PER_BLOCK);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arm_fir_q31(&amp;amp;S, &amp;amp;q31RxDMABuffer[i][bufIndx].samples[0], &amp;amp;q31TxDMABuffer[i][bufIndx].samples[0], AUDIO_SAMPLES_PER_BLOCK);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;AUDIO_NUM_CHANNELS;i++){&amp;nbsp; //loop through channels&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(j=0;j&amp;lt;AUDIO_SAMPLES_PER_BLOCK;j++){ //loop through samples&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(q31TxDMABuffer[i][bufIndx].samples[j] &amp;amp; 0x8000000){ //bit 31 is set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TxDMABuffer[i][bufIndx].samples[j] = q31TxDMABuffer[i][bufIndx].samples[j] &amp;amp; ~0xFF800000; //stuff sign bit in bit 23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&amp;nbsp;&amp;nbsp; //bit 31 is clear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TxDMABuffer[i][bufIndx].samples[j] = q31TxDMABuffer[i][bufIndx].samples[j] | 0xFF800000; //stuff sign bit in bit 23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufIndx ^=1;&amp;nbsp;&amp;nbsp;&amp;nbsp; //toggle buffer index for ping-pong buffering&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PCOR |= 0x8000;&amp;nbsp; //debug bit, PTA15 Clear&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code for converting fir filter coefficients from float to Q31 and initialization of fir filter:&lt;/P&gt;&lt;P&gt;NUM_TAPS = 10, AUDIO_SAMPLES_PER_BLOCK = 512&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14339763421407389 jive_text_macro" data-renderedposition="1659.199951171875_8_1232_64" jivemacro_uid="_14339763421407389"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //convert FIR filter coefficients to Q31&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arm_float_to_q31(&amp;amp;firCoeffF32[0], &amp;amp;firCoeffq31[0],NUM_TAPS);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //initialize fir filter instance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arm_fir_init_q31(&amp;amp;S, NUM_TAPS, &amp;amp;firCoeffq31[0], &amp;amp;firStateq31[0], AUDIO_SAMPLES_PER_BLOCK);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My fir filter coefficients (generated in MATLAB):&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14339763745386851" data-renderedposition="1765.199951171875_8_1232_64" jivemacro_uid="_14339763745386851"&gt;&lt;P&gt;float32_t firCoeffF32[NUM_TAPS] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.0021610938, -0.0168824365, -0.0076310975, 0.1506507546, 0.3760238733,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.3760238733, 0.1506507546, -0.0076310975, -0.0168824365, -0.0021610938&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:22:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448866#M26575</guid>
      <dc:creator>aaroncramer</dc:creator>
      <dc:date>2020-11-02T13:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448867#M26576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;"&lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;(RxDMABuffer[i][bufIndx].samples[j] &amp;amp; &lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green; background-color: #f6f6f6;"&gt;0x0080000&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;){ &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #008200; background-color: #f6f6f6;"&gt;//bit 23 is set"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;Are you checking 20th bit instead of 24th bit!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 17:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448867#M26576</guid>
      <dc:creator>nehalpatel</dc:creator>
      <dc:date>2015-07-17T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448868#M26577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Aaron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how about just left shifting 8 bit to convert from 24 bits fractional value to Q31 fraction value:&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;OL class="dp-cpp" start="1"&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword"&gt;for(i=&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;;i&amp;lt;AUDIO_NUM_CHANNELS;i++)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;{&amp;nbsp; &lt;SPAN class="comment"&gt;//loop through channels&lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword"&gt;for(j=&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;;j&amp;lt;AUDIO_SAMPLES_PER_BLOCK;j++)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;SPAN class="comment"&gt;//loop through samples&lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; q31RxDMABuffer[i][bufIndx].samples[j] = RxDMABuffer[i][bufIndx].samples[j]&amp;lt;&amp;lt;8;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;}&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;BR&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 09:27:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448868#M26577</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-07-20T09:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448869#M26578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for catching that error, Nehal.&amp;nbsp; It turned out, in addition to this error, I also had my codec configured incorrectly.&amp;nbsp; The bit alignment was off, causing the sign bit to be shifted by one.&amp;nbsp; Thish caused the random seeming noise and roll over observed when I applied the fir filter.&amp;nbsp; After correcting the error you found and correcting the codec configuration all is working.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 15:35:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448869#M26578</guid>
      <dc:creator>aaroncramer</dc:creator>
      <dc:date>2015-07-20T15:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448870#M26579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, checking wrong bit can't cause the signal(noise) that you posted. Noise was coming from multiple sources. But, I am glad to point out one error, while I am also new for CMSIS. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 18:29:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448870#M26579</guid>
      <dc:creator>nehalpatel</dc:creator>
      <dc:date>2015-07-20T18:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help converting raw ADC data to Q31 and using CMSIS-DSP arm_fir_q31?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448871#M26580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's how I converted my "uint16" to "int32" format&lt;/P&gt;&lt;P&gt;adc_RX_int32 = (int32_t) (adc_Rx_uint16)-0x00008000;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 22:04:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Help-converting-raw-ADC-data-to-Q31-and-using-CMSIS-DSP-arm-fir/m-p/448871#M26580</guid>
      <dc:creator>nehalpatel</dc:creator>
      <dc:date>2015-07-23T22:04:36Z</dc:date>
    </item>
  </channel>
</rss>

