cancel
Showing results for 
Search instead for 
Did you mean: 

ADC to FFT help

weejonas28
Associate II
Posted on July 06, 2016 at 16:38

Hi, I am very new to Stm32 and i am currently using the stm32f429 discovery board. I was given a task to feed the ADC data which the signal is obtain from a signal generator into FFT to analyse the signal in frequency domain. I am using a sampling frequency of 8Khz.

I really need help in this as i am very confuse on how it works. Do i need to use a timer to trigger ADC conversion every 8000Hz or  do i use DMA to store ADC data up to 8000hz then transfer to FFT. 

I am also very confuse on why is interrupt being used.

Please help me out here.
3 REPLIES 3
Posted on July 06, 2016 at 17:19

What other microprocessor or programming experience do you have?

If the sample rate is 8 KHz, then you need to set the timer to generate pulses at that rate to trigger the start of each sample.

''..do i use DMA to store ADC data up to 8000hz..''

What does this even mean? How many samples do you need to perform the FFT? How long does the FFT take? If you need 1024 samples, then you will need to wait for 1024 to be collected.

''I am also very confuse on why is interrupt being used.''

Interrupts are used to indicate all the data is ready for processing, so you can do other productive work, or sleep, while they are collected, rather than sitting in a loop waiting for them.

Why can't your teacher, or person setting the task, explain these things too you?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
weejonas28
Associate II
Posted on July 07, 2016 at 04:42

Thanks for the help, I am currently a student that was given a task which is out of the fiethat i was taught hence, sorry for asking such ridiculous questions.

AvaTar
Lead
Posted on July 07, 2016 at 07:32

If you are more than superficially familiar with C, I suggest to download the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32065.html

, which contains an FFT example for the STM32F4 (scroll all the way down to the ''Get Software'' button).

It is slightly more complex than the Blinky one uses to start with.