2022-10-11 01:29 AM
2022-10-11 01:30 AM
int32_t lsm6dsox_reset_set(I2C_HandleTypeDef *i2c, uint8_t val)
{
lsm6dsox_ctrl3_c_t ctrl3_c;
uint8_t ret;
ret = lsm6dsox_read_reg(i2c,LSM6DSOX_READ, LSM6DSOX_CTRL3_C, (uint8_t *)&ctrl3_c, 1); // i canot read the default register value (0x04).
if(ret==0)
{
ctrl3_c.sw_reset = (uint8_t)val;
ret = lsm6dsox_write_reg(i2c,LSM6DSOX_WRITE, LSM6DSOX_CTRL3_C, (uint8_t *)&ctrl3_c, 1);
}
return ret;
}
2022-10-11 01:31 AM
what can i do to solve and correct the reading process and get the true value from the sensor ?
2022-11-07 06:47 AM
Hello,
You can look this post to see example using lsm6dsox sensor maybe it can help you to find the root cause of your issue.
Best Regards