STM32F4 FPU and DSP

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

STM32F4 FPU and DSP

Post 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
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 FPU and DSP

Post 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
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: STM32F4 FPU and DSP

Post 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.
wisit
Posts: 1
Joined: Wed Aug 14, 2013 5:11 pm

Re: STM32F4 FPU and DSP

Post 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
toan21
Posts: 1
Joined: Thu Jan 23, 2014 5:15 pm

Re: STM32F4 FPU and DSP

Post by toan21 »

hi guys, check this out ! I hope it can help you. https://www.youtube.com/watch?v=JXE3GzNDM2c
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: STM32F4 FPU and DSP

Post 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
Post Reply