Skip to main content
Associate II
May 26, 2024 5:50 PM UTC
Solved

[IMU] Talking to sensors on sensor hub

So i have a LSM6DSOX and connected to its sensor hub LIS3MDL.

Currently I'm trying to log data to feed into the NanoEdge studio.  So i need to grab data from the actual LIS3MDL.

On the sensor hub you can read and write registers through the sensor hub correct?

This topic has been closed for replies.
Federica Bossi
Federica BossiBest answer
ST Technical Moderator
May 29, 2024 6:47 AM UTC

Hi @BA_ ,

On github you can find some official examples on how to implement sensor hub using LSM6DSOX and LIS2MDL. You can use them as starting point.

Hope this helps :)

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

4 replies

BA_Author
Associate II
May 26, 2024 7:32 PM UTC

So you set the address to be a read or write SLV0_ADD (15h)

Then with SLV0_SUBADD (16h) you can set the register

Then this is used to write the value DATAWRITE_SLV0 (21h)

But i don't know how a data read works.  Also not sure how you read more then one sensor?

 

 

BA_Author
Associate II
May 26, 2024 7:35 PM UTC

The read somehow comes from the SENSOR_HUB_1-18

Federica Bossi
Federica BossiBest answer
ST Technical Moderator
May 29, 2024 6:47 AM UTC

Hi @BA_ ,

On github you can find some official examples on how to implement sensor hub using LSM6DSOX and LIS2MDL. You can use them as starting point.

Hope this helps :)

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
BA_Author
Associate II
Jun 2, 2024 12:39 AM UTC