LIS3DH Address Changes Post-Config
I am using a LIS3DH breakout board that is exhibiting weird behavior. My I2C master is a STM32L496 board that has been tested OK with other I2C chips.
Startup
- I2C init to 400 KHz
- Scan all possible addresses via HAL_I2C_IsDeviceReady() loop
- Remember address
- Read WHO_AM_I register
- If it's an LIS3DH, Write config registers
If I write 0x00 into CTRL_REG0, the next write or read is NACK'd.
If I reset the MCU, the reported address from step 3 changes to 0x10. (thus the NACK)
So, on power cycle, the address from step 3 is 0x30 and post-config the chip NACK's 0x30.
On MCU reset, the address from step 3 is 0x10 and everything works OK.
I believe writing 0x00 to CTRL_REG0 is the root cause. It seems like undocumented behavior.
Anyone else see this issue?
