cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate 9-axis data with geomagnetic information using the ISPU function of lsm6dso16is

LittleBigQi
Associate II

Hi, I am trying to generate 9-axis quaternion data using the ISPU function of the LSM6DSO16IS.
Hardware environment: nucleo-F401RE + IKS01A3 + LSM6DSO16IS.

2.png

Software environment: cube ide project generated with MEMS-STUDIO. configuratin file inside ISPU is F:\en.x-cube-ispu\Ispu\ism330is_lsm6dso16is\sensor_fusion_9x\output\sensor_ fusion_9x.ucf.

1.png

Now I have a couple of queries that I can't understand:
1. I understand that the IIC pin of the geomagnetic sensor LIS2MDL should be connected to the MSDA,MSCL pin of the LSM6DSO16IS, and the LSM6DSO16IS takes the initiative to read the data from the LIS2MDL, and then the ISPU generates the 9-axis data with geomagnetic information. However, when I read the production project code, I found that the LIS2MDL data is read/written through the IIC interface of F401 microcontroller, which is mounted on the same iic bus as the LSM6DSO16IS, if so, how can the ISPU get the geomagnetic information to generate the 9-axis data?

3 - 副本.png4 - 副本.png5 - 副本.png

2. en.x-cube-ispu\Ispu\ism330is_lsm6dso16is\sensor_fusion_9x\output\ shub.ucf How is this file used? This is supposed to read and write geomagnetic data via the master iic of the LSM6DSO16IS, but the algobuild in MEMS-STUDIO does not use this file?

3.How does the 9-axis output of the ispu function perform geomagnetic offset correction?

The above issues need to be resolved urgently, and I sincerely look forward to your reply!

3 REPLIES 3
Federica Bossi
ST Employee

Hi @LittleBigQi ,

Welcome to ST Community!

The AlgoBuilder firmware expects magnetometer sensor connected to primary I2C but so this trial will not work with AlgoBuilder firmware
In order to connect the LIS2MDL magnetometer on IKS01A3 to LSM6DSO16IS (in DIL24) sensor hub interface, some HW configuration must be done.
See the user manual UM2559, page6 (connection in mode 4), in this way the LIS2MDL is connected to the DIL24 in sensor hub mode (JP7 and JP8 in 2-3 position and SB12, SB19 disconnected, SB16, SB21 connected).

The FW which can be used in DatalogExtended from X-CUBE-ISPU package for F401RE
In MEMS Studio two ISPU configuration needs to be loaded shub.ucf to configure sensor hub, sensor_fusion_9x.ucf to program ISPU with 9-axis sensor fusion algorithm,  then it should be able to stream the data to MEMS Studio application.

About the magnetometer calibration can you try to see the readme file in the git hub repository of sensor_fusion_9x.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

How to load ISPU configuration twice in algobuilder?

Federica Bossi
ST Employee

Hi @LittleBigQi ,

You can do it with MEMS Studio as you do with the firmware.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.