This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/TM4C123GH6PM:ARM_FFT_BIM_Example_F32代码:如何实现 bin 到 frequency 的转换?

Guru**** 2466670 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/669272/ccs-tm4c123gh6pm-arm_fft_bin_example_f32-code-how-the-conversation-of-bin-to-frequency-is-done

器件型号:TM4C123GH6PM

工具/软件:Code Composer Studio

代码如下:

#include "arm_math.h"
#include "arm_const_structs.h"
#define TEST_LENGTH_SAples 2048
/*--------------------------------------
* FFT Bin 的外部输入和输出缓冲器声明示例
************************************************************************************************** *
/*--------------------------------------
* FFT Bin 示例的全局变量
************************************************************************************************** *
uint32_t fftSize = 1024;
uint32_t ifftFlag = 0;
uint32_t doBitReverse = 1;
/*二进制八进制总能量最大值时的参考指数*/
uint32_t refIndex = 213、 testIndex = 0;
/*----------------------------------------------
*最大幅度 FFT Bin 测试
************************************************************************************************** *
int32_t main(空)
float32_t maxValue;
状态= ARM_MATH_SUCCESS
/*通过 CFFT/CIFFT 模块处理数据*/
ARM_CFFT_F32(&ARM_CFFT_SR_F32_len1024testInput_F32_10kHzifftFlagdoBitReverse);
/*通过的复数幅度模块处理数据
计算每个区间的幅度*/
/*计算 maxValue 并返回相应的 bin 值*/
if (testIndex != refIndex)
/*----------------------------------------------
**如果信号未通过通过通过检查,则在此环路。
**这表示测试失败
**-------------------------------------- *
if (status!= ARM_MATH_SUCCESS)
while (1);
while (1);/* main 函数不返回*/
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    我认为您最好将问题发布到 ARM 站点以获得 CMSIS 支持、因为我们实际上不是该库的专家。 我只能说明213是指以下链接中发生 BIN 最大能量的指数值。

    github.com/.../arm_fft_bin_example_f32.c