LIS3DH in FIFO mode gives garbage output
I'm trying to configure a LIS3DH to trigger INT1 after filling FIFO, after which I want to read out everything over I2C and then repeat.
I've gotten it to work (at f=10 Hz, I get INT1 interrupts at the expected ~3 sec interval), but when I read out the data, I get 0x00 values only. When I configure without the FIFO (trigger INT1 on every sample), I get reliable data. But then I added the following:
init:
- CTRL_REG5: flip FIFO_ENABLE bit
- FIFO_CTRL_REG: flip MODE_STREAM bit and set FTH bits to 31
- CTRL_REG3: OVERRUN on INT1 instead of DRDY
on INT1 signal:
- read FIFO_SRC_REG, set N to BITS(0:4) - this is always 31 so it's looking good so far
- loop 32 times: burst read six bytes starting at output reg 0x28 (OUT_X_L)
- Check FIFO_SRC_REG, ensure EMPTY bit is set. It always is.
But when I dump out the data, it's always 0x000000000000. Anyone have any idea what could be going on here?
