cancel
Showing results for 
Search instead for 
Did you mean: 

MEMS Studio CSV export - Documentation for new_data bitmask field?

hareee234
Associate

Hello,

I'm using MEMS Studio to log data from a multi-sensor glasses platform for biomarker extraction research. My sensor configuration includes:

  • ST1VAFE6AX (Accelerometer @ 240 Hz, Gyroscope @ 240 Hz, vAFE enabled)
  • LIS2MDL (Magnetometer)
  • LPS22DF (Pressure)
  • STTS22H (Temperature)

The CSV export includes a new_data column containing hex values (e.g., 0x08, 0x10, 0x18, 0x20, 0x400). I understand this is a bitmask indicating which sensor(s) have new data in each row, but I cannot find official documentation for the bit assignments.

Through empirical analysis (checking which sensor columns actually change when each bit is set), I determined:

Bit Mask Sensor Correlation

Bit 30x08Accelerometer96.6%
Bit 40x10Gyroscope96.6%
Bit 50x20Magnetometer99.9%
Bit 60x40Pressure
Bit 100x400vAFE

Questions:

  1. Is there official documentation for the new_data bitmask format in MEMS Studio CSV exports?
  2. Are these bit assignments consistent across different sensor configurations, or are they dynamically assigned based on which sensors are enabled?
  3. Is filtering rows by this bitmask the recommended approach for extracting clean, single-sensor data streams at their true ODR?

Thank you for any guidance! 

1 ACCEPTED SOLUTION

Accepted Solutions
Miroslav BATEK
ST Employee

Hello @hareee234 

your observation is correct, here is complete list of bits for new_data flag:

Accelerometer0x008
Gyroscope0x010
Magnetometer0x020
Pressure Sensor0x001
Temperature Sensor0x002
Humidity Sensor0x004
Interrupt0x040
MLC0x080
FSM0x100
ISPU0x200
VAFE/QVAR0x400
Accelerometer HG0x800

We are going to add it in the next version of MEMS Studio user manual.

The bit assignment remains consistent across different sensor configurations.
Yes, filtering rows by this bitmask is the recommended approach for extracting clean, single-sensor data streams at their true ODR.
If you use DatalogExtended firmware you can also specify single sensor as Datalog period source, it means only new data from this sensor will create new line in the log file.

View solution in original post

2 REPLIES 2
Miroslav BATEK
ST Employee

Hello @hareee234 

your observation is correct, here is complete list of bits for new_data flag:

Accelerometer0x008
Gyroscope0x010
Magnetometer0x020
Pressure Sensor0x001
Temperature Sensor0x002
Humidity Sensor0x004
Interrupt0x040
MLC0x080
FSM0x100
ISPU0x200
VAFE/QVAR0x400
Accelerometer HG0x800

We are going to add it in the next version of MEMS Studio user manual.

The bit assignment remains consistent across different sensor configurations.
Yes, filtering rows by this bitmask is the recommended approach for extracting clean, single-sensor data streams at their true ODR.
If you use DatalogExtended firmware you can also specify single sensor as Datalog period source, it means only new data from this sensor will create new line in the log file.

Hello,

Thank you for the comprehensive bitmask mapping, seems like it works well. I've been able to extract as follows. 

Verified bitmasks:
- Accelerometer (0x008): ✓ 240.7 Hz, 75,827 samples
- Gyroscope (0x010): ✓ 240.7 Hz, 75,827 samples
- Magnetometer (0x020): ✓ 10.4 Hz, 3,261 samples
- Pressure (0x001): ✓ 1.0 Hz, 311 samples
- Temperature (0x002): ✓ 1.0 Hz, 315 samples
- vAFE/QVAR (0x400): ✓ 120.4 Hz, 37,913 samples
Seems like this would work well for our use case.