在微控制器上使用KISS_FFT

发布于 2025-01-28 00:00:54 字数 1091 浏览 2 评论 0原文

我是编译器概念的新手。

在一个上下文中,我要编程一个微控制器,我试图使用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:

IMAGE OF THE ERROR HERE

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文