Skip to main content
matas
Associate III
November 19, 2015
Question

STM32F4 FFT problem

  • November 19, 2015
  • 4 replies
  • 1096 views
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
This topic has been closed for replies.

4 replies

matas
matasAuthor
Associate III
November 20, 2015
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
Senior III
November 20, 2015
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
matasAuthor
Associate III
November 20, 2015
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
Senior III
November 20, 2015
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 ?