07-06-2023 12:11 AM
Hi, all
In function of bmi2_write_config_file(), I have a question for the following code.
if (rslt == BMI2_OK)
{
/* Check the configuration load status */
rslt = bmi2_get_internal_status(&load_status, dev);
/* Return error if loading not successful */
if ((rslt == BMI2_OK) && (!(load_status & BMI2_CONFIG_LOAD_SUCCESS)))
{
rslt = BMI2_E_CONFIG_LOAD;
}
}
I read load_status = 0xff and rslt = 0x00. Does it mean that the bmi2_write_config_file() is successfully write the configuation to IMU 270? from the code it is, but read an 0xff from the reg of 0x21, really means it has been successfuly initialised?
Thank you in advance.
07-06-2023 08:39 AM
Hi victorheca01,
The value of 0x21 register should be 0x01 if you load config file successfully. Refer to register description in BMI270 data sheet: