Help Needed with LSM6DSOX + LIS3MDL Sensor Hub Mode Configuration (FIFO)
Hello Community!
I hope you are all doing well. I'm currently working on a project that involves interfacing an LSM6DSOX accelerometer and gyroscope with a LIS3MDL magnetometer. My goal is to set up the LSM6DSOX in Sensor Hub Mode to collect and store data from the LIS3MDL into the LSM6DSOX's FIFO. However, I'm encountering some difficulties in configuring these sensors to work together effectively.
Here's an overview of the problem:
Hardware Setup: I have connected the LIS3MDL is connected to the LSM6DSOX via Sensor Hub Mode and LIS3MDL's DRDY is connected to the LSM6DSOX's INT2 pin (see AN5272 p.64).
Development Environment: I'm using nRF Connect IDE for VSCode for my firmware development.
Individual Configurations: I've successfully configured each sensor individually, but I'm struggling to configure the LSM6DSOX in Sensor Hub Mode to collect and store data from the LIS3MDL into its FIFO. It works for the Accelerometer and the Gyrometer Data, but no data from the LIS3MDL is stored in the FIFO. I believe my issue is mainly with the register settings and communication between the sensors.
Documentation Review: I've reviewed the datasheets and application notes for both the LSM6DSOX and the LIS3MDL, as well as the NRF5340 documentation, but I haven't been able to pinpoint what I'm missing.
I'm seeking guidance and expertise from the community to help me understand the correct register settings and configurations for the LSM6DSOX in Sensor Hub Mode, specifically within the nRF Connect IDE for VSCode environment. Any insights into how to set up the LSM6DSOX to collect data from the LIS3MDL and store it in its FIFO would be greatly appreciated.
Current Configuration:
If it helps, here's a summary of my current configuration settings for the LSM6DSOX and the LIS3MDL:
- LSM6DSOX:
- CTRL1_XL: 0xA4 (10100100)
- CTRL2_G: 0xAC (10101100)
- FIFO_CTRL1: 0x0A (00001010)
- FIFO_CTRL2: 0x00 (00000000)
- FIFO_CTRL3: 0x33 (00110011)
- FIFO_CTRL4: 0x06 (00000110)
- SLV0_ADD: 0x08 (00001000)
- SLV0_CONFIG: 0x08 (00001000)
- MASTER_CONFIG: 0x14 (00010100)
- CTRL6_C: 0x08 (00001000)
- LIS3MDL:
- CTRL_REG1: 0x02 (00000010)
- CTRL_REG2: 0x60 (01100000)
- CTRL_REG3: 0x00 (00000000)
I'm using nRF Connect IDE for VSCode for programming the NRF5340 and sensor communication.
Thank you in advance for your help and support. Please feel free to ask if you need more details about my current setup or if you have any questions regarding my configuration.
Looking forward to your responses!
Best regards,
