Hi
I want to use arm_cfft_radix4_init_q15() and arm_cfft_radix4_q15() function from CMSIS 3.2 library . I am unable to find any good resources or any examples. I have looked in the documents provided by ARM i.e CMSIS-DSP: Complex FFT Functions but I didn't find it useful. What are the inputs given to these functions I am still not clear with it. I tried writing the codes but it didn't worked . Is their any example codes for FFT? I tried to implement the example code provided with the library but that didn't worked instead the memory of my uc overflowed and gave error.
this is how I am calling the function,
arm_cfft_radix4_init_q15(&arm_cfft_sR_q15_len256, 256, 0, 1); // For init
arm_cfft_radix4_q15(&arm_cfft_sR_q15_len256, az); // For transformation where,
arm_cfft_radix4_instance_q15 arm_cfft_sR_q15_len256 = {256, 0, 1, twiddleCoef_256, armBitRevIndexTable256, 4U, 4U};
and az[512] is an array where the data is stored. Just for testing
float32_t az[512] = {1.2 ,0.0
1.3, 0.0
-------
--------
1.2, 0.0};
my programs hangs and I am not able to print the o/p. I am using eclipse based IDE with ARM Cortex-M4 based microcontroller with 128kb flash, my uc is Little Endian, with s/w floating point unit. Please look into the matter.
Kind Regards
Amit Kumar
Hello Amit,
If you have gotten CMSIS by installing Keil, try checking your install folder equivalent to:
C:\Keil_5\ARM\CMSIS\DSP_Lib\Examples\arm_fft_bin_example\ARM
In that folder are several project files (.uvproj) for Cortex M0,M3,M4. It's a project which has a very simple example of how to use the cfft. Depending on how old of a version of CMSIS you're using, you'll either see cfft_radix4 (though probably f32), or the newer arm_cfft_f32.
If that doesn't answer your questions on how to use it, just post back here and we can figure it out.
Cheers,
Dan