在微控制器上使用KISS_FFT
我是编译器概念的新手。
在一个上下文中,我要编程一个微控制器,我试图使用IIS(MEMS)读取aceleration数据,然后将FFT置于数据时,我开始使数据whit whit中断(中断例程定义为button_on_pa14_pressed)),),),),),),),我已经设置了中断,我可以将Aceleration Data whitout问题弄出一个问题,但是FFT不起作用(IM使用kiss_fft https://github.com/mborgerding/k ... )我得到以下错误:
我使用的代码是:
#include "kiss_fft.h"
#include "kiss_fft_log.h"
#include "kiss_fftnd.h"
#include "kiss_fftndr.h"
#include "kiss_fftr.h"
#include "IIS2DH_driver.h"
int Z;
volatile kiss_fft_scalar Z_data[500]={0x0};
volatile kiss_fft_cpx Z_fft;
volatile a=3;
uint32_t LIM=94;
//INTERRUPTION ROUTINE
static void button_on_PA14_pressed(void)
{
for (int i=0;i<LIM;i++)
{
Z_data[i]=IIS_get_Z(); //get the data of the MEMS all this works fine, defined in the IIS2DH_driver.h library
}
kiss_fftr_cfg cfg = kiss_fftr_alloc(LIM,0,NULL,NULL);
kiss_fftr(cfg,&Z_data,&Z_fft);
}
Im kinda new to the compilers concept.
a little context, im programing a microcontroler, im trying to use an IIS (MEMS) to read aceleration data, and then aplying a fft to the data, I start getting the data whit an interruption (interruption routine is defined as button_on_PA14_pressed)), I have setted the interruption and I can get the aceleration data whitout a problem, but the fft is not working (im using KISS_FFT https://github.com/mborgerding/k...) I get the following error:
The code I used was:
#include "kiss_fft.h"
#include "kiss_fft_log.h"
#include "kiss_fftnd.h"
#include "kiss_fftndr.h"
#include "kiss_fftr.h"
#include "IIS2DH_driver.h"
int Z;
volatile kiss_fft_scalar Z_data[500]={0x0};
volatile kiss_fft_cpx Z_fft;
volatile a=3;
uint32_t LIM=94;
//INTERRUPTION ROUTINE
static void button_on_PA14_pressed(void)
{
for (int i=0;i<LIM;i++)
{
Z_data[i]=IIS_get_Z(); //get the data of the MEMS all this works fine, defined in the IIS2DH_driver.h library
}
kiss_fftr_cfg cfg = kiss_fftr_alloc(LIM,0,NULL,NULL);
kiss_fftr(cfg,&Z_data,&Z_fft);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论