Sense.I.6P6
Complete driver for the Sense.I.6P6 tile (ICM-42686-P). Supports both I2C and SPI bus access via tiles_pal_t.
Supports both I2C and SPI bus access via tiles_pal_t.
Examples
Quick start — I2C (polling)
tile_t imu;
tile_sense_i_6p6_init(core_tiles_pal(&core_i2c3), 0, &imu, NULL);
int16_t accel[3], gyro[3];
tile_sense_i_6p6_get_raw_accels(&imu, accel);
tile_sense_i_6p6_get_raw_gyros(&imu, gyro);Quick start — SPI
tile_t imu;
tile_sense_i_6p6_init(core_tiles_pal(&core_spi1), 0, &imu, NULL);
int16_t accel[3];
tile_sense_i_6p6_get_raw_accels(&imu, accel);Quick start — interrupt-driven with callback
void on_data(tile_t *t, uint8_t events, void *ctx) {
int16_t buf[7];
tile_sense_i_6p6_get_raw_all(t, buf);
}
sense_i_6p6_cfg_t cfg = {
.on_event = on_data,
.int1_pin = 9, // Core pad connected to INT1
};
tile_sense_i_6p6_init(core_tiles_pal(&core_i2c3), 0, &imu, &cfg);
tile_sense_i_6p6_int1_data_ready(&imu, 1);
while (1) { tile_sense_i_6p6_process(&imu); }API reference
Initialization
tile_sense_i_6p6_find
uint8_t tile_sense_i_6p6_find(tiles_pal_t *hal, uint8_t instance)Check if a Sense.I.6P6 is present on the bus (address probe only).
tile_sense_i_6p6_init
void tile_sense_i_6p6_init(tiles_pal_t *hal, uint8_t instance, tile_t *tile, const sense_i_6p6_cfg_t *cfg)Performs soft reset, verifies WHO_AM_I, configures sensor ranges and ODR. Pass cfg=NULL for defaults (±8g, ±1000dps, 100Hz, polled).
- Blocks for ~2 ms (reset). Call once at startup.
Lifecycle
tile_sense_i_6p6_sleep
Studiovoid tile_sense_i_6p6_sleep(tile_t *tile)Enter sleep mode (accel + gyro off). ~7.5 µA.
tile_sense_i_6p6_wake
Studiovoid tile_sense_i_6p6_wake(tile_t *tile)Wake from sleep, restore low-noise mode. Range/ODR preserved.
tile_sense_i_6p6_reset
Studiovoid tile_sense_i_6p6_reset(tile_t *tile)Software reset. Blocks ~2 ms. Must call init() again after.
Runtime
tile_sense_i_6p6_set_accel_range
Studiovoid tile_sense_i_6p6_set_accel_range(tile_t *tile, sense_i_6p6_accel_range_t range)Set accelerometer full-scale range.
tile_sense_i_6p6_set_gyro_range
Studiovoid tile_sense_i_6p6_set_gyro_range(tile_t *tile, sense_i_6p6_gyro_range_t range)Set gyroscope full-scale range.
tile_sense_i_6p6_set_accel_odr
Studiovoid tile_sense_i_6p6_set_accel_odr(tile_t *tile, sense_i_6p6_odr_t odr)Set accelerometer output data rate.
tile_sense_i_6p6_set_gyro_odr
Studiovoid tile_sense_i_6p6_set_gyro_odr(tile_t *tile, sense_i_6p6_odr_t odr)Set gyroscope output data rate.
tile_sense_i_6p6_set_power_mode
Studiovoid tile_sense_i_6p6_set_power_mode(tile_t *tile, sense_i_6p6_power_mode_t accel, sense_i_6p6_power_mode_t gyro)Set power mode independently for accel and gyro.
- Wait 200 µs after changing mode before accessing other registers.
tile_sense_i_6p6_data_ready
Studiouint8_t tile_sense_i_6p6_data_ready(tile_t *tile)Check if new sensor data is available.
tile_sense_i_6p6_get_raw_accels
Studiovoid tile_sense_i_6p6_get_raw_accels(tile_t *tile, int16_t *buffer)Read raw accelerometer [X, Y, Z]. Convert: g = raw / sensitivity.
tile_sense_i_6p6_get_raw_gyros
Studiovoid tile_sense_i_6p6_get_raw_gyros(tile_t *tile, int16_t *buffer)Read raw gyroscope [X, Y, Z]. Convert: dps = raw / sensitivity.
tile_sense_i_6p6_get_raw_6dof
Studiovoid tile_sense_i_6p6_get_raw_6dof(tile_t *tile, int16_t *buffer)Burst read accel + gyro [AX, AY, AZ, GX, GY, GZ]. One transaction.
tile_sense_i_6p6_get_temperature
Studioint16_t tile_sense_i_6p6_get_temperature(tile_t *tile)Read temperature. Convert: degC = raw / 132.48 + 25.0
tile_sense_i_6p6_get_raw_all
Studiovoid tile_sense_i_6p6_get_raw_all(tile_t *tile, int16_t *buffer)Read all 7 channels [Temp, AX, AY, AZ, GX, GY, GZ] in one burst.
tile_sense_i_6p6_is_face_up
Studiouint8_t tile_sense_i_6p6_is_face_up(tile_t *tile)Reads the accelerometer once and returns 1 when Z is within ±200 mg of +1 g and X/Y are within ±300 mg of 0. Uses the current ACCEL_CONFIG0 full-scale range to compute thresholds at runtime, so the helper stays correct after `set_accel_range`. Integer math only.
Returns 1 if face-up, 0 otherwise.
tile_sense_i_6p6_is_face_down
Studiouint8_t tile_sense_i_6p6_is_face_down(tile_t *tile)Mirror of `is_face_up` with an inverted Z target. Same ±200 mg / ±300 mg tolerance bands; same range-aware thresholding.
Returns 1 if face-down, 0 otherwise.
tile_sense_i_6p6_is_moving
Studiouint8_t tile_sense_i_6p6_is_moving(tile_t *tile, uint16_t threshold_mg)Reads the accelerometer, computes the squared magnitude in raw counts, and compares against the squared 1-g + threshold band. Squared-form keeps the math integer (no sqrt). Threshold is symmetric around 1 g so the helper triggers on both lift and drop. Range-aware.
- threshold_mg
- Deviation threshold in milli-g (typical: 50–200).
Returns 1 if moving, 0 otherwise.
tile_sense_i_6p6_read_tilt_centi_degrees
Studiouint8_t tile_sense_i_6p6_read_tilt_centi_degrees(tile_t *tile, uint8_t axis, int16_t *out_centi_deg)Computes `atan2(axis, sqrt(other_a^2 + other_b^2))` for the requested axis using a small integer atan2 approximation. Output range: −18000..+18000 (i.e. −180.00°..+180.00°). Returns 0 and writes 0 to `*out_centi_deg` if the device is in free-fall or the accelerometer is off. Range-aware.
- axis
- 0 = X, 1 = Y, 2 = Z.
- out_centi_deg
- Output tilt in 0.01° (signed, −18000..+18000).
Returns 1 on success, 0 on bad axis or zero vector.
Events
tile_sense_i_6p6_process
Studiovoid tile_sense_i_6p6_process(tile_t *tile)In interrupt mode: returns immediately if no INT1 interrupt fired; reads INT_STATUS and fires callback only when events are pending. In polled mode: reads INT_STATUS every call, fires callback if set.
tile_sense_i_6p6_on_event
Studiovoid tile_sense_i_6p6_on_event(tile_t *tile, sense_i_6p6_event_cb_t cb, void *ctx)Register or change the event callback.
- cb
- Callback to fire on interrupt events. NULL to clear.
- ctx
- Opaque user pointer passed to the callback.
Config
tile_sense_i_6p6_set_filter_bw
Studiovoid tile_sense_i_6p6_set_filter_bw(tile_t *tile, sense_i_6p6_filter_bw_t accel_bw, sense_i_6p6_filter_bw_t gyro_bw)Set UI filter bandwidth for both accel and gyro.
tile_sense_i_6p6_set_filter_order
Studiovoid tile_sense_i_6p6_set_filter_order(tile_t *tile, sense_i_6p6_filter_order_t accel_order, sense_i_6p6_filter_order_t gyro_order)Set UI filter order for accel and gyro (1st, 2nd, or 3rd).
tile_sense_i_6p6_set_temp_filter
Studiovoid tile_sense_i_6p6_set_temp_filter(tile_t *tile, sense_i_6p6_temp_filter_t bw)Set temperature sensor filter bandwidth.
tile_sense_i_6p6_set_temp_enabled
Studiovoid tile_sense_i_6p6_set_temp_enabled(tile_t *tile, uint8_t enabled)Enable or disable the temperature sensor.
FIFO
tile_sense_i_6p6_fifo_config
Studiovoid tile_sense_i_6p6_fifo_config(tile_t *tile, sense_i_6p6_fifo_mode_t mode, uint8_t accel, uint8_t gyro, uint8_t temp, uint8_t hires)Configure the FIFO.
- mode
- FIFO operating mode (bypass/stream/stop-on-full)
- accel
- Include accel data in FIFO packets
- gyro
- Include gyro data in FIFO packets
- temp
- Include temperature in FIFO packets
- hires
- Enable 20-bit high-resolution mode (forces ±32g/±4000dps)
tile_sense_i_6p6_fifo_set_watermark
Studiovoid tile_sense_i_6p6_fifo_set_watermark(tile_t *tile, uint16_t records)Set the FIFO watermark threshold in records (1–4095).
tile_sense_i_6p6_fifo_flush
Studiovoid tile_sense_i_6p6_fifo_flush(tile_t *tile)Flush the FIFO (discard all data).
tile_sense_i_6p6_fifo_read_packet_flat
Studiovoid tile_sense_i_6p6_fifo_read_packet_flat(tile_t *tile, int32_t *out)Drops the struct in favor of a positional int[8] array — the DSL doesn't have a struct ABI yet, so the per-field outputs come back indexed. Layout: out[0..2] = accel x,y,z (raw int16 widened to int32) out[3..5] = gyro x,y,z (raw int16 widened to int32) out[6] = temp (raw int8 widened to int32) out[7] = timestamp (raw uint16) Drops the success bool — call fifo_count() first to know whether there's data. On an empty FIFO, the slots are left untouched.
- tile
- Initialised tile handle.
- out
- Output buffer (8 int32_t slots).
tile_sense_i_6p6_fifo_read_packets_flat
Studiouint16_t tile_sense_i_6p6_fifo_read_packets_flat(tile_t *tile, int32_t *out, uint16_t cap_ints)Drains up to N packets from the FIFO into the caller's int32 buffer, 8 ints per packet (same layout as fifo_read_packet_flat). Returns the number of *packets* read (not ints), so callers can iterate with `for i in 0..n { let ax = buf[i*8 + 0]; ... }`. The caller's array length is the int-cap (N packets × 8 ints), not the packet count — `cap_ints / 8` packets are attempted. Mirrors the cap-mode array-OUT convention used by Sense.BP read_fifo_batch.
- tile
- Initialised tile handle.
- out
- Output buffer; must be sized N × 8 ints.
- cap_ints
- Buffer capacity in int slots (= packets × 8).
Returns Number of packets actually drained from the FIFO.
tile_sense_i_6p6_fifo_count
Studiouint16_t tile_sense_i_6p6_fifo_count(tile_t *tile)Read the FIFO record count.
tile_sense_i_6p6_fifo_lost_count
Studiouint16_t tile_sense_i_6p6_fifo_lost_count(tile_t *tile)Get the number of lost FIFO packets since last check.
Interrupts
tile_sense_i_6p6_int1_config
Studiovoid tile_sense_i_6p6_int1_config(tile_t *tile, uint8_t config)Configure INT1 pin behavior.
- config
- OR'd flags: ACTIVE_HIGH|PUSH_PULL|LATCHED etc.
tile_sense_i_6p6_int1_data_ready
Studiovoid tile_sense_i_6p6_int1_data_ready(tile_t *tile, uint8_t enabled)Route data-ready interrupt to INT1.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_int1_fifo_ths
Studiovoid tile_sense_i_6p6_int1_fifo_ths(tile_t *tile, uint8_t enabled)Route FIFO watermark interrupt to INT1.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_int1_wom
Studiovoid tile_sense_i_6p6_int1_wom(tile_t *tile, uint8_t enabled)Route WOM (wake-on-motion) interrupt to INT1.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_int2_config
Studiovoid tile_sense_i_6p6_int2_config(tile_t *tile, uint8_t config)Mirrors int1_config for the chip's second interrupt pin (tile pad 8). INT_CONFIG bits [5:3] hold INT2's polarity / drive / mode bits. layout as int1_config; the driver shifts the bits into the INT2 positions internally).
- config
- OR'd flags: ACTIVE_HIGH|PUSH_PULL|LATCHED etc. (same
tile_sense_i_6p6_int2_data_ready
Studiovoid tile_sense_i_6p6_int2_data_ready(tile_t *tile, uint8_t enabled)Route data-ready interrupt to INT2.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_int2_fifo_ths
Studiovoid tile_sense_i_6p6_int2_fifo_ths(tile_t *tile, uint8_t enabled)Route FIFO watermark interrupt to INT2.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_int2_wom
Studiovoid tile_sense_i_6p6_int2_wom(tile_t *tile, uint8_t enabled)Route WOM (wake-on-motion) interrupt to INT2.
- enabled
- 1 to enable, 0 to disable
tile_sense_i_6p6_set_int_pulse_duration
Studiovoid tile_sense_i_6p6_set_int_pulse_duration(tile_t *tile, sense_i_6p6_int_pulse_t pulse)Applies to both INT1 and INT2 (it's a chip-wide setting in INT_CONFIG1 bit 6). Only affects pulse-mode interrupts; in latched mode the line stays asserted until the status register is read.
- tile
- Initialised tile handle
- pulse
- Pulse-width selector
tile_sense_i_6p6_get_int_status
Studiouint8_t tile_sense_i_6p6_get_int_status(tile_t *tile)Read and clear INT_STATUS register.
tile_sense_i_6p6_get_int_status2
Studiouint8_t tile_sense_i_6p6_get_int_status2(tile_t *tile)Read and clear INT_STATUS2 (WOM/SMD flags).
tile_sense_i_6p6_get_int_status3
Studiouint8_t tile_sense_i_6p6_get_int_status3(tile_t *tile)Read and clear INT_STATUS3 (APEX: step/tilt/tap flags).
Wake on Motion
tile_sense_i_6p6_wait_for_motion
Studiouint8_t tile_sense_i_6p6_wait_for_motion(tile_t *tile, uint32_t timeout_ms)Polls INT_STATUS2 at ~1 ms cadence. WOM must be configured (thresholds + enable) first. Returns on any-axis WOM. The status read clears the latch.
- timeout_ms
- Max time to wait, in ms. Use 0 for a single-shot poll.
Returns 1 if motion was detected, 0 on timeout.
tile_sense_i_6p6_wom_config
Studiovoid tile_sense_i_6p6_wom_config(tile_t *tile, uint16_t x_mg, uint16_t y_mg, uint16_t z_mg, sense_i_6p6_wom_mode_t mode)Configure Wake-on-Motion thresholds.
- x_mg
- X-axis threshold in mg (0–1000, resolution ~3.9 mg)
- y_mg
- Y-axis threshold in mg
- z_mg
- Z-axis threshold in mg
- mode
- Compare against initial or previous sample
- Requires accel to be running (LN or LP mode).
tile_sense_i_6p6_wom_enable
Studiovoid tile_sense_i_6p6_wom_enable(tile_t *tile)Enable WOM. Must configure thresholds first.
tile_sense_i_6p6_wom_disable
Studiovoid tile_sense_i_6p6_wom_disable(tile_t *tile)Disable WOM.
Motion Detection
tile_sense_i_6p6_smd_config
Studiovoid tile_sense_i_6p6_smd_config(tile_t *tile, sense_i_6p6_smd_mode_t mode)Configure and enable SMD. WOM thresholds must be set first.
Pedometer
tile_sense_i_6p6_pedometer_enable
Studiovoid tile_sense_i_6p6_pedometer_enable(tile_t *tile, sense_i_6p6_dmp_odr_t dmp_odr)Requires accel at ≥25 Hz. Initializes the DMP if not already running.
- dmp_odr
- DMP processing rate (25 or 50 Hz)
tile_sense_i_6p6_pedometer_disable
Studiovoid tile_sense_i_6p6_pedometer_disable(tile_t *tile)Disable the pedometer.
tile_sense_i_6p6_get_step_count
Studiouint16_t tile_sense_i_6p6_get_step_count(tile_t *tile)Read the step count.
Returns 16-bit step count (resets on power cycle or DMP reset)
tile_sense_i_6p6_get_step_cadence
Studiouint8_t tile_sense_i_6p6_get_step_cadence(tile_t *tile)Read the step cadence.
Returns Steps per second in u6.2 fixed-point (divide by 4.0 for float)
tile_sense_i_6p6_get_activity
Studiosense_i_6p6_activity_t tile_sense_i_6p6_get_activity(tile_t *tile)Read the activity classification.
Returns 0=unknown, 1=walk, 2=run
Tilt Detection
tile_sense_i_6p6_tilt_enable
Studiovoid tile_sense_i_6p6_tilt_enable(tile_t *tile, uint8_t wait_seconds)Triggers when device tilts >35° for the configured wait time. Requires accel at ≥25 Hz. Initializes DMP if needed.
- wait_seconds
- [0..6] s Time the tilt must be sustained (0, 2, 4, or 6).
tile_sense_i_6p6_tilt_disable
Studiovoid tile_sense_i_6p6_tilt_disable(tile_t *tile)Disable tilt detection.
Tap Detection
tile_sense_i_6p6_wait_for_tap
Studiouint8_t tile_sense_i_6p6_wait_for_tap(tile_t *tile, uint32_t timeout_ms)Polls INT_STATUS3 at ~1 ms cadence (delay_ms(1)). Tap detection must be enabled first via `tile_sense_i_6p6_tap_enable`. The status read is destructive (clear-on-read), so call `get_tap_result` immediately after a positive return to retrieve count/axis/direction.
- timeout_ms
- Max time to wait, in ms. Use 0 for a single-shot poll.
Returns 1 if a tap was detected, 0 on timeout.
tile_sense_i_6p6_tap_enable
Studiovoid tile_sense_i_6p6_tap_enable(tile_t *tile)Requires accel in LN mode at 200 Hz, 500 Hz, or 1 kHz. Initializes DMP if needed.
tile_sense_i_6p6_tap_disable
Studiovoid tile_sense_i_6p6_tap_disable(tile_t *tile)Disable tap detection.
tile_sense_i_6p6_get_tap_result_flat
Studiovoid tile_sense_i_6p6_get_tap_result_flat(tile_t *tile, int32_t *count, int32_t *axis, int32_t *direction, int32_t *timing)Same data, four positional out-scalars instead of a struct. Useful for polling-style flows; event-driven flows already get these values via the `Sense.I.6P6.tap` event payload.
- tile
- Initialised tile handle.
- count
- Output: 0 = none, 1 = single tap, 2 = double.
- axis
- Output: 0 = X, 1 = Y, 2 = Z.
- direction
- Output: 0 = positive, 1 = negative.
- timing
- Output: double-tap timing (chip-specific units).
Advanced
tile_sense_i_6p6_subsystem_reset
Studiovoid tile_sense_i_6p6_subsystem_reset(tile_t *tile, sense_i_6p6_subsystem_t which)Issues the relevant SIGNAL_PATH_RESET bit. Distinct from the driver's full `reset()` (which re-initialises the whole chip) and from `fifo_flush()` (which targets just the FIFO, also a subsystem reset but already exposed). - APEX: clears DMP memory and re-runs the DMP init sequence. Use after reconfiguring pedometer / tilt / tap features. - TEMP: resets the temperature signal path. Useful if temp readings appear stuck after a power glitch.
- tile
- Initialised tile handle
- which
- Subsystem to reset
tile_sense_i_6p6_set_gyro_offset
Studiovoid tile_sense_i_6p6_set_gyro_offset(tile_t *tile, int16_t x_dps16, int16_t y_dps16, int16_t z_dps16)Set user-programmable gyro offset.
- x_dps
- X offset in dps × 16 (12-bit signed, ±128 dps max, 0.0625 dps resolution)
- y_dps
- Y offset
- z_dps
- Z offset
tile_sense_i_6p6_set_accel_offset
Studiovoid tile_sense_i_6p6_set_accel_offset(tile_t *tile, int16_t x_mg, int16_t y_mg, int16_t z_mg)Set user-programmable accel offset.
- x_mg
- X offset in mg (12-bit signed, ±2000 mg max, 1 mg resolution)
- y_mg
- Y offset
- z_mg
- Z offset
tile_sense_i_6p6_self_test
Studiouint8_t tile_sense_i_6p6_self_test(tile_t *tile, uint8_t *accel_pass, uint8_t *gyro_pass)Runs the built-in self-test for both accel and gyro.
- accel_pass
- Output: 1 if accel self-test passed, 0 if failed (per-axis OR'd)
- gyro_pass
- Output: 1 if gyro self-test passed, 0 if failed
Returns 1 if both passed, 0 if either failed
tile_sense_i_6p6_read_reg
Studiouint8_t tile_sense_i_6p6_read_reg(tile_t *tile, uint8_t bank, uint8_t reg)Automatically switches to the specified bank and back to bank 0. For advanced/debug use.
- bank
- Bank index (0, 1, 2, or 4).
- reg
- Register address within the bank.
tile_sense_i_6p6_write_reg
Studiovoid tile_sense_i_6p6_write_reg(tile_t *tile, uint8_t bank, uint8_t reg, uint8_t val)Automatically switches to the specified bank and back to bank 0. For advanced/debug use.
- bank
- Bank index (0, 1, 2, or 4).
- reg
- Register address within the bank.
- val
- Byte to write.
Driver gaps · 6
Chip capabilities this driver doesn’t expose yet.
Events
- data_ready
- fifo_watermark
- tilt
- tap
- wake_on_motion
Enums
sense_i_6p6_accel_range_t
Accelerometer full-scale range.
- SENSE_I_6P6_ACCEL_32G
- +/- 32g
- SENSE_I_6P6_ACCEL_16G
- +/- 16g
- SENSE_I_6P6_ACCEL_8G
- +/- 8g
- SENSE_I_6P6_ACCEL_4G
- +/- 4g
- SENSE_I_6P6_ACCEL_2G
- +/- 2g
sense_i_6p6_gyro_range_t
Gyroscope full-scale range.
- SENSE_I_6P6_GYRO_4000DPS
- +/- 4000 deg/s
- SENSE_I_6P6_GYRO_2000DPS
- +/- 2000 deg/s
- SENSE_I_6P6_GYRO_1000DPS
- +/- 1000 deg/s
- SENSE_I_6P6_GYRO_500DPS
- +/- 500 deg/s
- SENSE_I_6P6_GYRO_250DPS
- +/- 250 deg/s
- SENSE_I_6P6_GYRO_125DPS
- +/- 125 deg/s
- SENSE_I_6P6_GYRO_62_5DPS
- +/- 62.5 deg/s
- SENSE_I_6P6_GYRO_31_25DPS
- +/- 31.25 deg/s
sense_i_6p6_odr_t
Output data rate selection.
- SENSE_I_6P6_ODR_32KHZ
- 32 kHz
- SENSE_I_6P6_ODR_16KHZ
- 16 kHz
- SENSE_I_6P6_ODR_8KHZ
- 8 kHz
- SENSE_I_6P6_ODR_4KHZ
- 4 kHz
- SENSE_I_6P6_ODR_2KHZ
- 2 kHz
- SENSE_I_6P6_ODR_1KHZ
- 1 kHz
- SENSE_I_6P6_ODR_200HZ
- 200 Hz
- SENSE_I_6P6_ODR_100HZ
- 100 Hz
- SENSE_I_6P6_ODR_50HZ
- 50 Hz
- SENSE_I_6P6_ODR_25HZ
- 25 Hz
- SENSE_I_6P6_ODR_12_5HZ
- 12.5 Hz
- SENSE_I_6P6_ODR_6_25HZ
- 6.25 Hz (accel LP only)
- SENSE_I_6P6_ODR_3_125HZ
- 3.125 Hz (accel LP only)
- SENSE_I_6P6_ODR_1_5625HZ
- 1.5625 Hz (accel LP only)
- SENSE_I_6P6_ODR_500HZ
- 500 Hz
sense_i_6p6_power_mode_t
Power mode for accel/gyro independently.
- SENSE_I_6P6_MODE_OFF
- Powered off
- SENSE_I_6P6_MODE_STANDBY
- Gyro only: drive on, no output
- SENSE_I_6P6_MODE_LP
- Accel only: duty-cycled
- SENSE_I_6P6_MODE_LN
- Low-noise (full performance)
sense_i_6p6_filter_bw_t
UI filter bandwidth selection.
- SENSE_I_6P6_FILT_BW_ODR_2
- ODR/2 (Nyquist)
- SENSE_I_6P6_FILT_BW_ODR_4
- max(400,ODR)/4 (default)
- SENSE_I_6P6_FILT_BW_ODR_5
- ODR/5
- SENSE_I_6P6_FILT_BW_ODR_8
- ODR/8
- SENSE_I_6P6_FILT_BW_ODR_10
- ODR/10
- SENSE_I_6P6_FILT_BW_ODR_16
- ODR/16
- SENSE_I_6P6_FILT_BW_ODR_20
- ODR/20
- SENSE_I_6P6_FILT_BW_ODR_40
- ODR/40
- SENSE_I_6P6_FILT_LP_1X_AVG
- LP mode: 1× averaging (default)
- SENSE_I_6P6_FILT_LP_16X_AVG
- LP mode: 16× averaging
sense_i_6p6_filter_order_t
UI filter order.
- SENSE_I_6P6_FILT_ORDER_1ST
- 1st order
- SENSE_I_6P6_FILT_ORDER_2ND
- 2nd order
- SENSE_I_6P6_FILT_ORDER_3RD
- 3rd order
sense_i_6p6_temp_filter_t
Temperature filter bandwidth.
- SENSE_I_6P6_TEMP_FILT_4000HZ
- 4000 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_170HZ
- 170 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_82HZ
- 82 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_40HZ
- 40 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_20HZ
- 20 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_10HZ
- 10 Hz cutoff
- SENSE_I_6P6_TEMP_FILT_5HZ
- 5 Hz cutoff
sense_i_6p6_fifo_mode_t
FIFO mode.
- SENSE_I_6P6_FIFO_BYPASS
- FIFO disabled
- SENSE_I_6P6_FIFO_STREAM
- Stream mode (oldest data replaced)
- SENSE_I_6P6_FIFO_STOP_ON_FULL
- Stop on full
sense_i_6p6_dmp_odr_t
APEX DMP output data rate.
- SENSE_I_6P6_DMP_ODR_25HZ
- 25 Hz
- SENSE_I_6P6_DMP_ODR_50HZ
- 50 Hz
sense_i_6p6_wom_mode_t
WOM (Wake-on-Motion) compare mode.
- SENSE_I_6P6_WOM_INITIAL
- Compare against first sample
- SENSE_I_6P6_WOM_PREVIOUS
- Compare against previous sample
sense_i_6p6_smd_mode_t
SMD (Significant Motion Detection) mode.
- SENSE_I_6P6_SMD_DISABLED
- Disabled
- SENSE_I_6P6_SMD_SHORT
- 1 second WOM window
- SENSE_I_6P6_SMD_LONG
- 3 second WOM window
sense_i_6p6_int_config_t
Interrupt pin configuration.
- SENSE_I_6P6_INT_ACTIVE_LOW
- Active low
- SENSE_I_6P6_INT_ACTIVE_HIGH
- Active high
- SENSE_I_6P6_INT_OPEN_DRAIN
- Open drain
- SENSE_I_6P6_INT_PUSH_PULL
- Push-pull
- SENSE_I_6P6_INT_PULSED
- Pulsed
- SENSE_I_6P6_INT_LATCHED
- Latched
sense_i_6p6_activity_t
APEX activity classification.
- SENSE_I_6P6_ACTIVITY_UNKNOWN
- Unknown
- SENSE_I_6P6_ACTIVITY_WALK
- Walking
- SENSE_I_6P6_ACTIVITY_RUN
- Running
sense_i_6p6_int_pulse_t
Pulse-width selector for INT pin pulse mode.
- SENSE_I_6P6_INT_PULSE_100US
- 100 µs pulse (default)
- SENSE_I_6P6_INT_PULSE_8US
- 8 µs pulse — for fast hosts
sense_i_6p6_subsystem_t
Subsystem selector for scoped resets.
- SENSE_I_6P6_RESET_APEX
- APEX (DMP) memory + state
- SENSE_I_6P6_RESET_TEMP
- Temperature signal path
Constants
| TILE_SENSE_I_6P6_VERSION_MAJOR | 1 | |
| TILE_SENSE_I_6P6_VERSION_MINOR | 2 | |
| TILE_SENSE_I_6P6_VERSION_PATCH | 0 | |
| ICM42686P_I2C_ADDR_DEFAULT | 0x69 | |
| ICM42686P_I2C_ADDR_ALT | 0x68 | |
| ICM42686P_B1_SENSOR_CONFIG0 | 0x03 | |
| ICM42686P_B1_GYRO_CFG_STATIC2 | 0x0B | |
| ICM42686P_B1_GYRO_CFG_STATIC3 | 0x0C | |
| ICM42686P_B1_GYRO_CFG_STATIC4 | 0x0D | |
| ICM42686P_B1_GYRO_CFG_STATIC5 | 0x0E | |
| ICM42686P_B1_GYRO_NF_COSWZ_X | 0x0F | |
| ICM42686P_B1_GYRO_NF_COSWZ_Y | 0x10 | |
| ICM42686P_B1_GYRO_NF_COSWZ_Z | 0x11 | |
| ICM42686P_B1_GYRO_CFG_STATIC9 | 0x12 | |
| ICM42686P_B1_GYRO_CFG_STATIC10 | 0x13 | |
| ICM42686P_B1_XG_ST_DATA | 0x5F | |
| ICM42686P_B1_YG_ST_DATA | 0x60 | |
| ICM42686P_B1_ZG_ST_DATA | 0x61 | |
| ICM42686P_B1_TMSTVAL0 | 0x62 | |
| ICM42686P_B1_TMSTVAL1 | 0x63 | |
| ICM42686P_B1_TMSTVAL2 | 0x64 | |
| ICM42686P_B1_INTF_CONFIG4 | 0x7A | |
| ICM42686P_B1_INTF_CONFIG5 | 0x7B | |
| ICM42686P_B2_ACCEL_CFG_STATIC2 | 0x03 | |
| ICM42686P_B2_ACCEL_CFG_STATIC3 | 0x04 | |
| ICM42686P_B2_ACCEL_CFG_STATIC4 | 0x05 | |
| ICM42686P_B2_XA_ST_DATA | 0x3B | |
| ICM42686P_B2_YA_ST_DATA | 0x3C | |
| ICM42686P_B2_ZA_ST_DATA | 0x3D | |
| ICM42686P_B4_APEX_CONFIG1 | 0x40 | |
| ICM42686P_B4_APEX_CONFIG2 | 0x41 | |
| ICM42686P_B4_APEX_CONFIG3 | 0x42 | |
| ICM42686P_B4_APEX_CONFIG4 | 0x43 | |
| ICM42686P_B4_APEX_CONFIG7 | 0x46 | |
| ICM42686P_B4_APEX_CONFIG8 | 0x47 | |
| ICM42686P_B4_APEX_CONFIG9 | 0x48 | |
| ICM42686P_B4_WOM_X_THR | 0x4A | |
| ICM42686P_B4_WOM_Y_THR | 0x4B | |
| ICM42686P_B4_WOM_Z_THR | 0x4C | |
| ICM42686P_B4_INT_SOURCE6 | 0x4D | |
| ICM42686P_B4_INT_SOURCE7 | 0x4E | |
| ICM42686P_B4_INT_SOURCE8 | 0x4F | |
| ICM42686P_B4_INT_SOURCE9 | 0x50 | |
| ICM42686P_B4_INT_SOURCE10 | 0x51 | |
| ICM42686P_B4_OFFSET_USER0 | 0x77 | |
| ICM42686P_B4_OFFSET_USER1 | 0x78 | |
| ICM42686P_B4_OFFSET_USER2 | 0x79 | |
| ICM42686P_B4_OFFSET_USER3 | 0x7A | |
| ICM42686P_B4_OFFSET_USER4 | 0x7B | |
| ICM42686P_B4_OFFSET_USER5 | 0x7C | |
| ICM42686P_B4_OFFSET_USER6 | 0x7D | |
| ICM42686P_B4_OFFSET_USER7 | 0x7E | |
| ICM42686P_B4_OFFSET_USER8 | 0x7F | |
| ICM42686P_WHOAMI_DEFAULT | 0x44 |

