1. 先用cube建立工程,其中勾选所有的库
2. 再工程文件下找到Drivers\CMSIS\DSP
在source\transformfunctions里可以找到arm_cfft_32.c,这是主要的;
然后我们通过\Examples\ARM\arm_fft_bin_example里的例程发现用法;
这是用法,关键的一点就是输入数组偶数为实数,奇数为0,因为输出的结果是复数,复数在用来计算幅值
arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);
/* Process the data through the Complex Magnitude Module for
calculating the magnitude at each bin */
arm_cmplx_ma