After each motion trigger I measured a current drain of 2mA for one ODR cycle long, possibly because the CPU is kept active as long as the interrupt line is kept active by the LIS2DH.
In case of permanent motion triggering this results in a active interrupt line for ⅓ of time so the mean current is about 0.6mA.
To lower the current during permanent triggering without changing the driver, a workaround is to disable the corresponding interrupt source in the trigger handler and re-enable it after eg. two ODR cycles using a k_timer.
Assuming the trigger event is configured for INT1 (in the device tree by anym-on-int1
) disabling of the interrupt could be done by:
i2c_reg_write_byte_dt(&sensor_i2c_spec, LIS2DH_REG_CTRL3, 0)
and re-enabling by:
i2c_reg_write_byte_dt(&sensor_i2c_spec, LIS2DH_REG_CTRL3, LIS2DH_EN_IA_INT1)
;