FPU going too slow
Hi, really can’t tell until you show the whole “offending” disassembly code.
General advices:
1. turn on the optimizations (-O2 or -O3) so that GCC can optimize the loops and.. the other things
2. use e.g. 1.0f instead of 1.0 (in C standard the latter is double while the former is float, STM32F4 hardware supports only float)