01-20-2022 04:08 PM
hi all,
I'm facing a problem with initial configuration of bmi270 using python.
Looking at its datasheet and configuring the device for normal power mode without the initialization sequence it doesn't work.I understand that config file must be loaded,but how can i load the config file with PYTHON SCRIPT in order to get BMI270 working? becouse now if i read data register (DATA_8 - DATA-13) without inizialization sequence i get always zero
I hope you can help me
Thanks and regards,
01-21-2022 02:33 AM
Hello abalog_2022,
There was BMI270 reference driver code and exmaple code based on C language on github.
https://github.com/BoschSensortec/BMI270-Sensor-API
As you used didn't used BMI270 reference API and operate register directly, you can still refer to the API to access the process of loading configuration files.
bmi2_write_config_file()
{
...
/* Write the configuration file */
rslt = write_config_file(dev);
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;
}
}
...
}
01-21-2022 10:35 AM
unfortunately the c example doesn't help.
it would be more helpful have a specific like this "memory address - byte to write", so that you can implement it with the following python command:
bus.write_byte_data (device_address, register, byte)
02-08-2022 06:54 AM
Hello abalog_2022,
The reference code is written in C language. You can refer to the logic of the code.
11-30-2022 03:26 AM
The problem should be
After bmi270_config_file sent, why the Internal_status register(0x21) return 0x00 (ASIC is not initialized).