‎2021-03-19 04:24 AM
Hi,
I am trying to calibrate my IMU on a custom board using X-CUBE-MEMS package. However there is no support for the LSM9DS1 part. I've seen on the community that the alternative for the Accelerometer+Gyroscope is the LSM303AGR library. However, this only offers support for the I2C bus. In my custom board, the IMU is connected to the uC through a SPI bus.
Is there any alternative?
Also, which library should I use to calibrate the magnetometer?
Thanks in advance,
Pedro Machado
Solved! Go to Solution.
‎2021-03-19 07:33 AM
Hi Pedro @Community member​ ,
the X-CUBE-MEMS1 firmware function pack is -in principle- independent from the platform (you don't need, for example, the X-NUCLEO-IKS01A3 board to use them.
The libraries in this package can be fed by any data (provided that it is accelerometer, gyroscope or magnetometer data, and that you are running them on an STM32 MCU) and the algorithm processes the input giving the required output.
For example, in the case of magnetometer calibration, you can just acquire the LSM9DS1 data and feed with them the MotionMC magnetometer calibration library, that provides real-time magnetometer calibration using hard iron (HI) and scale factor coefficients to correct magnetometer data.
-Eleon
‎2021-03-19 07:33 AM
Hi Pedro @Community member​ ,
the X-CUBE-MEMS1 firmware function pack is -in principle- independent from the platform (you don't need, for example, the X-NUCLEO-IKS01A3 board to use them.
The libraries in this package can be fed by any data (provided that it is accelerometer, gyroscope or magnetometer data, and that you are running them on an STM32 MCU) and the algorithm processes the input giving the required output.
For example, in the case of magnetometer calibration, you can just acquire the LSM9DS1 data and feed with them the MotionMC magnetometer calibration library, that provides real-time magnetometer calibration using hard iron (HI) and scale factor coefficients to correct magnetometer data.
-Eleon
‎2021-03-19 07:44 AM
I didn't know that X-CUBE had become a meme ?!
:beaming_face_with_smiling_eyes: :face_with_tears_of_joy: :grinning_face_with_sweat:
‎2021-04-07 05:04 AM
:grinning_face_with_sweat: