|
发表于 2014-7-30 12:37:17
|
显示全部楼层
用库处理,很省事。
/* Process the data through the CFFT/CIFFT module */
arm_cfft_f32(&arm_cfft_sR_f32_len128, ADCValue, ifftFlag, doBitReverse);
//
/* Process the data through the Complex Magnitude Module for
calculating the magnitude at each bin */
arm_cmplx_mag_f32(ADCValue, testOutput, fftSize); // 求出模值
//
/* Find the maxvalue*/
arm_max_f32(testOutput,(fftSize/2),&maxValue, &testIndexMax);
Um=maxValue/((float32_t)fftSize); //幅值 |
|