STM32 3CT Example

Should do, if you’re using the standard setup. You should see something like…

 -mfpu=fpv4-sp-d16 -mfloat-abi=hard

in your builds. If you’re only doing it ever 2.5 secs then it’s probably worth taking the hit of the higher precision.

I tried the DSP a while ago for ffts and the results were pretty good. I also played with using its dot product function for calculating Power. The V*I calculation is effectively the dot product of two big vectors. The DSP can also get you the RMS value of a vector. But given the need to do all of those, and some phase error adjustment, I didn’t pursue it very far. The current technique has the advantage of doing a single pass through the data whereas each of those DSP operations would require their own pass. But as I say, I didn’t pursue it very far, so don’t let me discourage you if you want to give it a shot.