LIS2DTW12 control registers do not persist changes
We are trying to integrate the LIS2DTW12 into our project but aren't able to get basic functionality to work correctly. We see the correct value from `WHO_AM_I`, but then all registers are read only - i.e., when we write to the control registers then read them back, we still see only the default values on the registers. We can recreate this problem on all of our units.
Here is our startup sequence, taken from AN5038 (which is for the LIS2DW12, but seems as though it should apply):
- Read `WHO_AM_I` (`0x0F`) and receive `0x44`
- Read `CTRL2` (`0x21`) and receive `0x04`
- Write `0x44` to `CTRL2` for `SOFT_RESET`
- Wait 100us
- Write `0x84` to `CTRL2` for `BOOT`
- Wait 25ms
- Read `CTRL2` (`0x21`) and receive `0x04`
- Write `0x08` to `CTRL2` to enable `BDU` and disable `IF_ADD_INC`
- Read `CTRL2` (`0x21`) and receive `0x04`
- While `BDU` from `CTRL2` is set to `0`, go to step 8 above
Using this procedure, we never leave the loop and the register is never set. This is true if we attempt to write to any register. We see the same behavior without attempting to write to `BOOT` as well, and we aren't even sure that the `SOFT_RESET` or `BOOT` are even doing anything at all since it seems likely that they are not being set. We have no access to the `INT1` or `INT2` pins. Are we missing something about the setup for the LIS2DTW12?
EDIT Just wanted to mention that R/W and ACK bits are as expected, so it doesn't looks like it's an I2C problem.






