• AVR Freaks

Hot!DSP_TransformFFT32_setup

Author
Pete F
Starting Member
  • Total Posts : 77
  • Reward points : 0
  • Joined: 2018/07/18 07:49:10
  • Location: 0
  • Status: offline
2019/04/25 07:30:18 (permalink)
0

DSP_TransformFFT32_setup

My setup is:
MCLAB X IDE v5.10
XC32 (v2.15)
Harmony 2.06
Demo Kit DM320010 PIC32MZ Embedded Graphics with Stacked DRAM (DA) Starter Kit
PIC32MX2064DAG169
 
I have been running my code doing FFTs for the past month with no problem with a 1024 FFT (log2N=10).
I was now ready to try running a 2048 FFT (log2N=11)
 
int log2N = 11;
int32c fftCoefs[2048];
int32c *fftc;
 
fftc = &fftCoefs;
DSP_TransformFFT32_setup(fftc, log2N); //Call FFT setup function
 
It never comes out of "DSP_TransformFFT32_setup".
Is  log2N =10  the LIMIT?????
If so, sure wish it said so in the docs.

-Pete
#1

3 Replies Related Threads

    LostInSpace
    Super Member
    • Total Posts : 271
    • Reward points : 0
    • Joined: 2016/03/11 22:47:59
    • Location: 0
    • Status: offline
    Re: DSP_TransformFFT32_setup 2019/04/28 18:31:29 (permalink)
    0
    I have run 8k, 32bit FFT's without issues on a large PIC32MZ.
     
    In the notes for the FFT Setup function it says,
     
    Remarks:
        This function is of considerable length and executed in C.  It is recommended
        it only be called once for any given FFT length in time sensitive applications."
     
    So it should be easy to step into and debug.
     
    HTH
    #2
    Pete F
    Starting Member
    • Total Posts : 77
    • Reward points : 0
    • Joined: 2018/07/18 07:49:10
    • Location: 0
    • Status: offline
    Re: DSP_TransformFFT32_setup 2019/06/14 12:29:55 (permalink)
    0
    Turns out I made a mistake as to what was causing the problem.
     
    This guy right here was stopping things from working.   
    DSP_TransformWindow_Cosine32(OutVector32, InVector32, gn_fftsamples);
     
    Here is what I did but it locks up if gn_fftsamples is over 1024.
     
    int32_t OutVector32[4096];
    int32_t InVector32[4096];
    for (mn16_x=0;mn16_x<gn_fftsamples;mn16_x++)
         InVector32[mn16_x]= gn32c_fftin[mn16_x].re;


    DSP_TransformWindow_Cosine32(OutVector32, InVector32, gn_fftsamples);
     
    for (mn16_x=0;mn16_x<gn_fftsamples;mn16_x++)
         gn32c_fftin[mn16_x].re=OutVector32[mn16_x];


     
     

    -Pete
    #3
    LostInSpace
    Super Member
    • Total Posts : 271
    • Reward points : 0
    • Joined: 2016/03/11 22:47:59
    • Location: 0
    • Status: offline
    Re: DSP_TransformFFT32_setup 2019/06/14 18:01:59 (permalink)
    0
    I never tried to set the vectors bigger than what I was actually using. You might try,
    #define gn_fftsamples 1024;
    int32_t OutVector32[gn_fftsamples];
    int32_t InVector32[gn_fftsamples];
    . . . // Do whatever to InVector
    DSP_TransformWindow_Cosine32(OutVector32, InVector32, gn_fftsamples);
     
    Also the CHM help file says that "DSP_TransformWindow" is written in C, so you should be able to debug it.
     
    Hope this helps... Hang in there, we'll get it!  ;-)
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5