Dear all
Read this post https://community.nxp.com/t5/i-MX-RT/FFT-Fast-Fourier-Transform-operations-on-i-MXRT-platforms/m-p/1... here and try to do an FFT with arm_rfft_fast_f32.c, I am using RT1024. Read the example for Keil project too for some SDK (not included for SDK RT1024) and noticed it doesn't call the init function, so I am a bit confused on the procedure to let the library work, please help .
1. Do I need to call the arm_rfft_fast_init_f32 function first? if so, when ?
2. What is the way to link the library, I put it by link the libarm_cortexM7lfsp_math.a file, I hope that is the correct file for RT1024, please confirm.
3. Any example for MCUXpresso IDE?
Thanks!
Ping
Hi, Omar
Thanks for answering me!
I got the precompiled libarm_cortexM7lfdp.a file from SDK RT1024 shown as below and linked the library into project, I hope that is ok too?
I tried the complex example provided for Keil uVision in MCUXpresso, and it works there - same index is resulted using the same data set. however, when input my own data, the result is not in agree with what I input. I am not sure whether I should use complex FFT or real FFT, the input data set is real anyway in both cases. I am interested in getting power FFT only. So I tried to use fast real one, and it ends up hard fault and also modified some variables has nothing to do with the input ot output of FFT. I wonder whether the real fast FFT function there works. Here is some test sample for a short 128 data FFT, it is 400Hz signal, I get close FFT result from Matlab.
float FLCdata[128] = {
148,94,7,7,129,148,148,7,7,7,
148,148,107,7,7,116,148,147,7,7,
7,148,148,119,7,7,104,148,148,7,
7,7,148,148,132,7,7,91,148,148,
7,7,7,148,148,146,7,7,79,148,
148,7,7,7,148,148,148,7,7,66,
148,148,17,7,7,148,148,148,7,7,
54,148,148,29,7,7,148,148,148,7,
7,42,148,148,42,7,7,148,148,148,
7,7,29,148,148,54,7,7,148,148,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
};
But I cannot get it from the library using complex function. Try to use the real fast f32 type, cannot get it initialised - failure. Advice please?
Regards!
Ping
Ping
Hello
Hope you are well. I will gladly answer your questions:
1. Yes, I suggest you use the init function before using the FFT operation.
2. You can add the library in the project wizard while you are creating your project:
If your project is already created, you can add it in the SDK management(right-click project -> SDK Management -> Manage SDK Components)
3. You can create a new project including the CMSIS DSP library and copy the source code from the examples listed in the documentation: https://www.keil.com/pack/doc/CMSIS/DSP/html/group__groupExamples.html
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar