Page 1 of 1

MPU9250 STM32F411re

Posted: Wed Oct 14, 2020 5:34 pm
by JoergSH
Hello I have problems with the sparkfun dmp libary. https://github.com/sparkfun/SparkFun_MP ... no_Library

Lib runs fine on Sam21d (m0 without FPU)

on the 411 filter is not working correct. I think it is a problem of the FPU. Any suggestions ?
there are other libs witch have same problem. on device with fpu calculations are bad.

regards

Re: MPU9250 STM32F411re

Posted: Wed Oct 14, 2020 6:11 pm
by stevestrong
Do you have an example which shows the bad calculation?
Any reference to other lib which have the same problem?
Which core do you use?
Which board?
viewtopic.php?f=2&t=301

Re: MPU9250 STM32F411re

Posted: Fri Oct 16, 2020 7:21 pm
by JoergSH
thats not so easy to explain.
Board is a Blackpill with STM32f411.

[env:blackpill_f411ce]
platform = ststm32
board = blackpill_f411ce
framework = arduino

The code was written for the sam21d.
On sam after reset Kompass are fast in right direction. On the 411 compas starts count from 0 up to 50 degrees in about 10 seconds. Than is stabel but did not have the correct direction to north. there are no changes in code. I think there went something wrong when the fpu does the calculation.

Re: MPU9250 STM32F411re

Posted: Sat Oct 17, 2020 8:43 am
by stevestrong
I have a black F411 board, so I could eventually check, but without any example I cannot figure out what can go wrong.
I assume you use PIO. Have you tried with Arduino?
Again, which core do you use?

Re: MPU9250 STM32F411re

Posted: Sat Oct 17, 2020 2:45 pm
by JoergSH
I have blackpill too.
I use VS Code with PlattfomIo. Using as standard STM32Duino
it makes no difference when I use arduino IDE.

The Sample from github is for a MPU9250. There a Quaternions and Kalman Filter calculated. So my thought is a problem when compiler use FPU.

Re: MPU9250 STM32F411re

Posted: Sat Oct 17, 2020 3:45 pm
by fpiSTM
My 2 cents is that some rounding in the operation...

Re: MPU9250 STM32F411re

Posted: Sun Oct 18, 2020 4:56 am
by JoergSH
fpiSTM wrote: Sat Oct 17, 2020 3:45 pm My 2 cents is that some rounding in the operation...
Maybe but why only when using fpu ?

Re: MPU9250 STM32F411re

Posted: Sun Oct 18, 2020 3:02 pm
by JoergSH
is it possible to say the compiler not to use the fpu?