2018-03-12 04:18 AM
Hello everyone:
I have to make the FFT on my STM32L4 32KC board and I don�t know where to start.
Sound is coming from the outside and I have to make the FFT.
Any tips would help a lot.
I�ve looking on the net for help, but everything was a little to messy for me.
I�m pretty new to micro-controlers, so there are many things that I ignore unfortunately.
Thanks in advance for your time and help.
#stm32 #fft #l4 #cmsis #dsp2018-03-12 05:00 AM
Do you have any experience with FFTs, or digital signal processing in general?
Clearly, that's a basic foundation.
Do you have any prior experience with the STM32?or any other microcontroller(s)? or programming in general?
For basic getting-started tips, see:
2018-03-13 02:18 AM
Hi there,
I'm currently on a projet where i'm using a FFT!So in order to start, and to explain it as simply as i can, here are some functions that you'll need :
arm_cfft_f32(&arm_cfft_sR_f32_len2048,son0, I_FFT_FLAG, BIT_REVERSE_FLAG); arm_cmplx_mag_f32(son0, a_signal_output, LENGTH_FFT);these two functions combined return you an FFT of your sampled signal.
'son0' is your input signal
'a_signal_output' is your FFT
of course it's not this easy ...
You have to add some files to your project! indeed theses function are from ARM libraries. I can't share you them, but if you found arm_math.h on google, you are heading the right way. (i'm sorry i don't remember where i get the files from ...)I'm not very experienced with FFT on the STM32 but mine is working so i hope i can give you some clue!
oh! i forget to mention, an FFT takes a HUGE TIME to be calculated (test it on mathlab) so if you want better performances try using an STM32H7 at 400Mhz! I think it will help you a lot!2018-03-13 02:55 AM
I know the common idea of FFT, but I´ve never worked with it or anything related.
Yes I have worked with STM32 but only with the basics, Timers, ADC, UART,GPIO...
Thank you
2018-03-13 05:07 AM
Hi
de_Miguel.Endika
,My recommendation for you is to start with
http://www.st.com/resource/en/application_note/dm002739pdf
:Digital signal processing for STM32 microcontrollers using CMSIS.
The associated firmware (
) is developped and tested using STM32F429xx and STM32F746xx MCUs, but can be adapted toSTM32L4.-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-03-13 05:11 AM
Thank you, I will try it
2018-03-13 05:24 AM
oh! i forget to mention, an FFT takes a HUGE TIME to be calculated (test it on mathlab) so if you want better performances try using an STM32H7 at 400Mhz!
That depends on one's definition of 'huge'.
Last time I checked, the FFT implementation of the ARM_DSP lib was limited to 2048 points.
In one of my projects, that took about 2.5 ms per cycle on a F407 with 168 MHz, using only compiler optimizations.
Just turn up (frequency) resolution as much as necessary, and not as possible.
2018-03-13 06:08 AM
yes indeed!
I try with an F4 too, but it doesn't even contest the H7 for the FFT calculations!and of course resolution imply much for the FFT !
2018-06-25 09:01 AM
You should try to break the problem down to at least two separate parts.
1. Fft: most fft routines are hardware independent and can be debugged easily on a PC. All is involved here is to organize the input as per the requirements of your fft routines.
2. Adc: this part is hardware dependent but can be easily structured so that the hardware dependence is minimized.
The 2nd part is specific to your target and you can figure that out on your own. The first part is easy to solve as there are tons of code floating around, from arm, St, integer or floating, ....
You just need to have some understanding of fft and it becomes quite easy after that.
2018-06-25 10:38 AM
Hi
st.mcu
,Any examples on FFT single point calculation for STM32F4 MCUs ? I need to calculate FFT for specific points, and not for a whole table.
Regards,
Wael.