Page 1 of 1

STM32F4 FPU and DSP

Posted: Fri Jan 11, 2013 10:27 pm
by Rick Burnett
Hello!

I have followed the instructions for turning on the FPU, what I am now curious about is the DSP/FPU specific functions that come in the CMSIS library. I notice that there is some code installed in the os/ports/common/ARMCMx/include areas.

Questions I have:

(1) Would it be better to use the files and precompiled library from ST?

(2) If I wanted to use the version in ChibiOS, is there a library installed or do I need to compile it from the source somewhere and link it in?

Basically, I'm just trying to work within the structure expected by ChibiOS so I am always afraid to start adding a bunch of hardware specific code when I don't understand what that could do. Having looked at the DSP code that the STM32F4 supports I REALLY want to take advantage of that code.

Thanks!
RIck

Re: STM32F4 FPU and DSP

Posted: Sat Jan 12, 2013 7:50 am
by Giovanni
Hi,

ChibiOS does support the FPU, this means that the FPU is enabled on startup and the FPU registers are saved during context switching, any library using the FPU should be usable without changes. I didn't test it but the CMSIS library should work as-is.

Giovanni

Re: STM32F4 FPU and DSP

Posted: Sat Jan 12, 2013 2:57 pm
by Rick Burnett
Well then I will try it out! :) I am going to use objdump to verify what the compiler is doing once I start using that code. I'll post back here in case others are wanting to do the same things if I run into anything.

Re: STM32F4 FPU and DSP

Posted: Wed Aug 14, 2013 5:14 pm
by wisit
Hi Rick,

Have you figured this out? I'm thinking of doing the same thing. But not sure how to proceed. Any suggestions would be much appreciated.

Thanks,
W

Re: STM32F4 FPU and DSP

Posted: Thu Jan 23, 2014 5:19 pm
by toan21
hi guys, check this out ! I hope it can help you. https://www.youtube.com/watch?v=JXE3GzNDM2c

Re: STM32F4 FPU and DSP

Posted: Thu Jan 23, 2014 5:47 pm
by mobyfab
Hey,

Don't use the DSP lib from ST, it's an older version.

I have made an example using the FFT functions a while ago, it should get you started.
You can check the code here: https://github.com/mobyfab/ChibiOS-Exam ... F4-LCD-DSP