資源簡介
這是一個(gè)利用adc采集數(shù)據(jù)然后對信號(hào)進(jìn)行傅里葉分析的例程,具體的講解和fft的用法可以間我的博客。

代碼片段和文件信息
/**
??******************************************************************************
??*?@file????main.c?
??*?@author??MCD?Application?Team
??*?@version?V1.2.1
??*?@date????31-October-2014
??*?@brief???Main?program?body
??******************************************************************************
??*?@attention
??*
??*?©?COPYRIGHT?2014?STMicroelectronics
??*
??*?Licensed?under?MCD-ST?Liberty?SW?License?Agreement?V2?(the?“License“);
??*?You?may?not?use?this?file?except?in?compliance?with?the?License.
??*?You?may?obtain?a?copy?of?the?License?at:
??*
??*????????http://www.st.com/software_license_agreement_liberty_v2
??*
??*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software?
??*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS?
??*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
??*?See?the?License?for?the?specific?language?governing?permissions?and
??*?limitations?under?the?License.
??*
??******************************************************************************
??*/
/*?Includes?------------------------------------------------------------------*/
#include?“main.h“
/**?@addtogroup?STM32F30x_StdPeriph_Templates
??*?@{
??*/
/*?Private?typedef?-----------------------------------------------------------*/
/*?Private?define?------------------------------------------------------------*/
/*?Private?macro?-------------------------------------------------------------*/
/*?Private?variables?---------------------------------------------------------*/
/*?Private?function?prototypes?-----------------------------------------------*/
/*?Private?functions?---------------------------------------------------------*/
#include?“arm_math.h“?
#include?“arm_const_structs.h“
#include?“Wave.h“
#include?
?
/*?Private?function?prototypes?-----------------------------------------------*/
#ifdef?__GNUC__
??/*?With?GCC/RAISONANCE?small?printf?(option?LD?linker->Libraries->Small?printf
?????set?to?‘Yes‘)?calls?__io_putchar()?*/
??#define?PUTCHAR_PROTOTYPE?int?__io_putchar(int?ch)
#else
??#define?PUTCHAR_PROTOTYPE?int?fputc(int?ch?FILE?*f)
#endif?/*?__GNUC__?*/?
?
#define?ADC1_DR_Address?0x50000040
#define?Buffer_Length??1024
#define?REAL_OPERATE?1?//?1---For?real?ADC?FFT?0---?For?simulate?data?FFT
#define?TEST_LENGTH_SAMPLES?2048?
?
/*?-------------------------------------------------------------------?
*?External?Input?and?Output?buffer?Declarations?for?FFT?Bin?Example?
*?-------------------------------------------------------------------?*/?
float32_t?testInput_f32_10khz[TEST_LENGTH_SAMPLES];?
float32_t?testOutput[TEST_LENGTH_SAMPLES/2];?
?
/*?------------------------------------------------------------------?
*?Global?variables?for?FFT?Bin?Example?
*?-------------------------------------------------------------------?*/?
uint32_t?fftSize?=?1024;?
uint32_t?ifftFlag?=?0;?
uint32_t?doBitRevers
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_class_marks_example\
?????文件????????8440??2014-10-30?22:43??DSP_Lib\Examples\arm_class_marks_example\arm_class_marks_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_convolution_example\
?????文件???????11055??2014-10-30?22:43??DSP_Lib\Examples\arm_convolution_example\arm_convolution_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_dotproduct_example\
?????文件????????6949??2014-10-30?22:43??DSP_Lib\Examples\arm_dotproduct_example\arm_dotproduct_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_fft_bin_example\
?????文件???????44301??2014-10-30?22:43??DSP_Lib\Examples\arm_fft_bin_example\arm_fft_bin_data.c
?????文件????????5921??2014-10-30?22:43??DSP_Lib\Examples\arm_fft_bin_example\arm_fft_bin_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_fir_example\
?????文件???????12581??2014-10-30?22:43??DSP_Lib\Examples\arm_fir_example\arm_fir_data.c
?????文件????????9181??2014-10-30?22:43??DSP_Lib\Examples\arm_fir_example\arm_fir_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_graphic_equalizer_example\
?????文件???????16520??2014-10-30?22:43??DSP_Lib\Examples\arm_graphic_equalizer_example\arm_graphic_equalizer_data.c
?????文件???????23356??2014-10-30?22:43??DSP_Lib\Examples\arm_graphic_equalizer_example\arm_graphic_equalizer_example_q31.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_linear_interp_example\
?????文件?????4298483??2014-10-30?22:43??DSP_Lib\Examples\arm_linear_interp_example\arm_linear_interp_data.c
?????文件????????8728??2014-10-30?22:43??DSP_Lib\Examples\arm_linear_interp_example\arm_linear_interp_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_matrix_example\
?????文件????????8339??2014-10-30?22:43??DSP_Lib\Examples\arm_matrix_example\arm_matrix_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_signal_converge_example\
?????文件???????20234??2014-10-30?22:43??DSP_Lib\Examples\arm_signal_converge_example\arm_signal_converge_data.c
?????文件???????10162??2014-10-30?22:43??DSP_Lib\Examples\arm_signal_converge_example\arm_signal_converge_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_sin_cos_example\
?????文件????????5847??2014-10-30?22:43??DSP_Lib\Examples\arm_sin_cos_example\arm_sin_cos_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\arm_variance_example\
?????文件????????7428??2014-10-30?22:43??DSP_Lib\Examples\arm_variance_example\arm_variance_example_f32.c
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\Common\
?????目錄???????????0??2018-07-23?15:24??DSP_Lib\Examples\Common\ARM\
............此處省略295個(gè)文件信息
評(píng)論
共有 條評(píng)論