cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-MEMES for LSM9DS1

PMach.1
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

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

Andrew Neil
Chief III

I didn't know that X-CUBE had become a meme ?!

😁 😂 😅

😅