MDK-ARM平台下的fft
MDK-ARM平台https://img-blog.csdnimg.cn/20210315114144116.pnghttps://img-blog.csdnimg.cn/20210315114213350.png #include "arm_math.h"#include "arm_const_structs.h"
#define N 128
float32_t testInput={0};
float32_t FFT_Output={0};
int main(void)
{
/*
ST固件库中的启动文件已经执行了 SystemInit() 函数,该函数在 system_stm32f4xx.c 文件,主要功能是
配置CPU系统的时钟,内部Flash访问时序,配置FSMC用于外部SRAM
*/
bsp_Init(); /* 硬件初始化 */
printf("start\r\n");
for(int i=0;i<N/4;i++)
{
testInput=1;
testInput=0;
testInput=-1;
testInput=0;
}
arm_cfft_f32(&arm_cfft_sR_f32_len128,(float32_t *)testInput,0, 1);
arm_cmplx_mag_f32((float32_t *)testInput, FFT_Output, N);
for(int i=0;i<N;i++)
{
printf("%d: %f\r\n",i,FFT_Output);
}
/* 主程序大循环 */
while (1)
{
}
}
页:
[1]