Strange whoamI value LSM6DSO32
Hi all
I'm working with an STM32F405 and one LSM6DSO32 and one LIS2DU12, eveyrthing works fine, but sometimes, for unknow reason, I go a strange whoamI from my captor, I got 0x20 value, I reset my mcu and it's works fine, any idea ?
For my driver I use STM driver coming from stm github rep.
Here is my i2c init function :
I2C_HandleTypeDef hi2c1;
void I2C1_Init(void){
hi2c1.Instance = I2C1;
hi2c1.Init.ClockSpeed = 400000;
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
hi2c1.Init.OwnAddress2 = 0;
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
if (HAL_I2C_Init(&hi2c1) != HAL_OK)
HANDLE_CRITICAL_ERROR(ERROR_INIT_I2C);
}
