I am using an Application Board 3.0 with a BMI085 Shuttle Board 3.0 connected to it with COINES SDK v.2.9 on Ubuntu 22.04 and the latest Sensor API for the BMI085 (v.1.9.0). I have successfully updated the firmware on the application board and can establish a connection via USB. However, every attempt to initialize the gyroscope results in the following error (occurring both when running on the PC and on the board):
bmi08g_init Error [-2]: Communication failure
If I comment out the code for gyroscope utilization, I can successfully read the accelerometer data.
Here is the part of the code from the accel_fifo_full example that I modified to read the accelerometer data:
static int8_t init_bmi08(void)
{
int8_t rslt;
rslt = bmi08xa_init(&bmi08dev);
bmi08_error_codes_print_result("bmi08xa_init", rslt);
// Commented out by me (hier the init function fails)
// if (rslt == BMI08_OK)
// {
// rslt = bmi08g_init(&bmi08dev);
// bmi08_error_codes_print_result("bmi08g_init", rslt);
// }
if (rslt == BMI08_OK)
{
printf("Uploading config file !\n");
rslt = bmi08a_load_config_file(&bmi08dev);
bmi08_error_codes_print_result("bmi08a_load_config_file", rslt);
}
if (rslt == BMI08_OK)
{
bmi08dev.accel_cfg.odr = BMI08_ACCEL_ODR_1600_HZ;
if (bmi08dev.variant == BMI085_VARIANT)
{
bmi08dev.accel_cfg.range = BMI085_ACCEL_RANGE_16G;
}
else if (bmi08dev.variant == BMI088_VARIANT)
{
bmi08dev.accel_cfg.range = BMI088_ACCEL_RANGE_24G;
}
bmi08dev.accel_cfg.power = BMI08_ACCEL_PM_ACTIVE;
bmi08dev.accel_cfg.bw = BMI08_ACCEL_BW_NORMAL;
rslt = bmi08a_set_power_mode(&bmi08dev);
bmi08_error_codes_print_result("bmi08a_set_power_mode", rslt);
rslt = bmi08xa_set_meas_conf(&bmi08dev);
bmi08_error_codes_print_result("bmi08xa_set_meas_conf", rslt);
// Commented out by me
// bmi08dev.gyro_cfg.odr = BMI08_GYRO_BW_230_ODR_2000_HZ;
// bmi08dev.gyro_cfg.range = BMI08_GYRO_RANGE_250_DPS;
// bmi08dev.gyro_cfg.bw = BMI08_GYRO_BW_230_ODR_2000_HZ;
// bmi08dev.gyro_cfg.power = BMI08_GYRO_PM_NORMAL;
// rslt = bmi08g_set_power_mode(&bmi08dev);
// bmi08_error_codes_print_result("bmi08g_set_power_mode", rslt);
//
// rslt = bmi08g_set_meas_conf(&bmi08dev);
// bmi08_error_codes_print_result("bmi08g_set_meas_conf", rslt);
}
return rslt;
}
I have double-checked the connections, updated the firmware, and used the latest Sensor API. Despite these efforts, the issue persists.
I also tried using Development Desktop v.3.28 on Windows 11 with the same setup, but it also fails to start up when the shuttle board is connected.
What could be causing this communication failure with the gyroscope, and how can I resolve it?
Any guidance or troubleshooting tips would be greatly appreciated.