I am currently using a STEVAL-MKI135V1 with a LIS2DH mounted on.
According to the datasheet, the adress is supposed to be 0x31 or 0x33 (depending on the SD0 pin pulled down or low).
I use an ATSAML11 mounted on the board SAML11 XplainedPro. I use the I2C bus declared in the Atmel Start Project to do so with the HAL driver SYNC.
The thing is that my I2C bus recognizes the LIS2DH at the address 0x18 or 0x19 instead of 0x31 or 0x33 as it is supposed to be. Why?
Also, I can read in all the register (the WHO_AM_I register shows me 0x33 as it is supposed to be) but it seems I can not write inside the registers to put the LIS2DH in "power-up mode".
I am using both HAL_driver functions that remain untouched by me :
i2c_m_sync_cmd_read(struct i2c_m_sync_desc *i2c, uint8_t reg, uint8_t *buffer, uint8_t length)
i2c_m_sync_cmd_write(struct i2c_m_sync_desc *i2c, uint8_t reg, uint8_t *buffer, uint8_t length)
According to the datasheet, the value in the CTRL_REG1 is supposed to be by default at 0x07 shows that it stays in power-down mode wherever I try to write in the registers.( And by the way, the readings and writing functions return the value '0' as they should.)
The adress issue is not that important. I don't mind the slave address but it seems that it has an incidence on the principal issue : I can not write in any register.
Someone already has this issue?