cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 FFT problem

matas
Associate II
Posted on November 19, 2015 at 15:36

I have installed all DSP source files on the project and f32 fft works perfectly, but when I switch to q31 or q15, while  the input buffer shows got data, the output buffers all values (the frequency spectrum) are 0. All the files were replaced to the same files for q15 or q31. Has anyone encountered this?

#fft-stm32f4
Foo Bar
4 REPLIES 4
matas
Associate II
Posted on November 20, 2015 at 07:48

A foolish mistake, since the amplitude is now in q15, the sensitivity is a little smaller (less bits in the amplitude). Since the sensitivity was smaller the fft did not detect so much noise, thus outputing 0's. Needed to apply bigger amplitude movement on the sensor.

Foo Bar
AvaTar
Lead
Posted on November 20, 2015 at 08:33

For a M4 with FPU, using q15 or q31 makes limited sense.

Unlike (some) DSPs, these formats are not natively supported on the Cortex M core and need to be emulated. On M0/M3 cores, this is still faster than a single-precision floating point emulation.

matas
Associate II
Posted on November 20, 2015 at 17:33

I tried to achieve minimal time for FFT, q15 and q31 took less time than f32, for the same sample quantity.

Foo Bar
AvaTar
Lead
Posted on November 20, 2015 at 18:38

>I tried to achieve minimal time for FFT, q15 and q31 took less time than f32, for the same sample quantity.

 

Built the f32 code to actually use the FPU ?