Hi all,
I've been playing with the Tiva Launchpad and in particular with the compdcm_mpu9150 example employing the SensorHub Boosterpack.
I modified it so that it sends via UART, at 100Hz, the ASCII representation of both "xacc_calibrated" and "xacc":
float xacc_calibrated = xacc * 0.0011970964f;
where "xacc" is the uncalibrated raw measurement taken from the MPU9150. Then I acquire the values of "xacc" and "xacc_calibrated" from the other end of the UART (acquiring data with MATLAB).
I found a strange behaviour: the ratio
xacc_calibrated / xacc
is not always 0.0011970964f !!! For a few samples (like 6 samples over 2434 samples) I got values < 0.0011970964f, like 1.1500e-03 .
I'm compiling the code with --fp_reassoc=off and --fp_mode=strict and --float-operations-allowed=32, as reccomended at http://processors.wiki.ti.com/index.php/Floating_Point_Optimization .
The wrong ratio values are associated with high accelerations (obtained shaking the MPU9150 sensor).
I would exclude UART connection / computer connection as problem source because I tried moving the processing of "xacc_calibrated" from MATLAB to the Tiva: even in that case I found that the processing outputs are wrong, because of wrong values of "xacc_calibrated". For these reasons, I believe that the problem is caused by wrong floating point calculations on the Tiva... any suggestion on how to proceed?
Thanks A LOT for any hint!
Francesco