Detect whether LSM6DS3 is in low-power mode or not, and enable gyro sleep accordingly.
Hi,
I have an LSM6DS3 connected to an ESP32. I can see the INT1_INACT_STATE and INT1_WU interrupts attached to INT1 coming through, and I can read WU_IA and SLEEP_STATE_IA in WAKE_UP_SRC after the interrupts.
However, the SLEEP_STATE_IA interrupt comes whenever the status changes, but I would like to know whether the LSM6DS3 is now inactive or not.
One reason for this is to only recalibrate the Gyro when the LSM6DS3 is inactive.
Another important reason is to toggle the Gyro to sleep mode after inactive state is achieved, and to wake it up again when active.
Is there any way to detect the active/inactive state after the interrupt?
