Hi@all,
we are currently implementing the ICM20948 in our application. We are using the DMP and so far everything is working fine. However, we are not able to restore the acceleration, gyro and compass bias values. We are able to read the values and write them to the registers mentioned in the application note, however the icm20948 does not seem to care about the written values and always insists of performing a full auto calibration cycle. Therefore we have to turn the device around all axis a few times until all accuracy values go to the value of 3.
I would expect that if the bias restore succeeds the accuracy values should immediately go to 3 and a full manual calibration cycle would not be needed.
Is there any documentation or example available that explains how to properly store and restore these values. If not, what is the recommended way of using the imu with dmp immediately after startup without having to fully calibrate it on every startup.
We are using the latest firmware from the sdk and the https://github.com/sparkfun/SparkFun_ICM-20948_ArduinoLibrary libary. We already took a look at the driver available in the download section. However the driver does not cover the bias store and restore mechanism.
Best Regards,
Thomas
Hello,
You mentioned that you are able to read the values and write them to the registers mentioned in the application note. What is the Application Note you are referring to? I also want to highlight that reading/writing DMP memory and FIFO through I2C in a multithreaded environment can cause wrong data being read.
To avoid the issue, one may use SPI instead of I2C, or use I2C with mutexes.
Hello Mustafa,
we are using a mutex locked i2c environment and we are able to read and write any of the values. However, the writing of the bias values seems to have no effect to the sensor as it is not raising the accuracy values after being initialized and still takes ages and a lot of movement around all axis to calibrate. Eventually if we move it as expected during an initial calibration the gyro, accel and compass accuracy raised from 0 to 3 and the values are stable and accurate. We would love to have this behavior directly after startup.
The application note i was referring to is for the ICM-20648
https://www.cdiweb.com/datasheets/invensense/application_note-programming_sequence_for_dmp_hw_functions_icm_20648.pdf
Looking at the code that is used by the emD-SmartMotion-ICM20948-1.1.1 we have implemented the functionality in the same way. However, the functions that are defined for the setting the bias values are not used anywhere in the eMD code.
How is the proper approach on using the bias store/restore mechanism? Did I understand it correctly that without storing and restoring the DMP bias the IMU has to be fully calibrated from scratch each time the ICM-20948 performs a reset? Or is there another way to get this done by using an alternate approach. I would expect that we should perform a single full calibration during the manufacturing process and then store the corresponding values. In the field application the device should be programmed with the pre stored bias values at startup and then immediately output calibrated data. During runtime we would fetch the bias values and store them on a regular basis to have up to date pre stored values that we are able to load at startup.
Do you have any suggestion on how to achieve this behavior? Please note that we have managed to support all functionality on the device and the only open point is this store/restore mechanism. Moving to a new device would take us back to the scratchpad so at the current time this is not an preferred option.
Best Regards,
Thomas
Hello,
Were you able to solve your issue?
hi
@MOD_Mustafa and @tbaumannmgiede
we are using ICM20948 with DMP for angle measurement in motion. 20-30 seconds later from start, after self calibration completed DMP generates correct values for pitch and roll. also i am able to read Gyro bias and Accel bias values but loading back these values with setBias() functions seems doesn't have any effect.
our goal is saving gyro&accel calibration then after cold start getting pitch and yaw vales much faster, not needed instant values but with in 5-10 seconds.
also second goal is reloading this bias values when IMU boots in movement (like in a car-bus etc) so it does not need to make calibration with no movement.
we understand DMP is correcting bias values over time constantly but we expect quick and better respond at start with loaded biases.
Hello,
I understand your ultimate goal, but I am not sure if it can be achieved. What have you tried so far to make it work?
The issue @czorgormezgmailcom is exactly the same issue we are facing. Calibration works as expected and reading out the calibration values also works as described. However writing the calibration values into the icm20948 does not seam to have any effect.
Unfortunately there is not official documentation about how to achieve this and the sdk does not cover this functionality. If tdk would be able to provide a working example this would help a lot.