03-23-2022 01:50 PM - edited 03-23-2022 01:57 PM
Hi,
We are trying to migrate our own BMI085 driver to https://github.com/BoschSensortec/BMI08x-Sensor-API, howeven when run read_sensor_data.c, we get bellow error message:
BMI08x initialization success!
Accel chip ID - 0x1f
Gyro chip ID - 0xf
Uploading config file !
bmi08a_load_config_file Error [-6] : Config stream error
init_bmi08x Error [-6] : Config stream error
It fails when check BMI08X_REG_ACCEL_INTERNAL_STAT:
if (rslt == BMI08X_OK)
{
/* Wait till ASIC is initialized. Refer the data-sheet for more information */
dev->delay_us(BMI08X_MS_TO_US(BMI08X_ASIC_INIT_TIME_MS), dev->intf_ptr_accel);
/* Check for config initialization status (1 = OK)*/
rslt = bmi08a_get_regs(BMI08X_REG_ACCEL_INTERNAL_STAT, ®_data, 1, dev);
}
In our original driver, we don't do much configure to Accel, and we can read out the Accel samples from register 0x12-0x17, like bellow
---Acc: 2741 6050 60997 (13.125013 13.125013 13.125013)
---Acc: 2744 6065 60984 (13.139379 13.139379 13.139379)
---Acc: 2734 6063 60982 (13.091495 13.091495 13.091495)
---Acc: 2749 6074 60980 (13.163321 13.163321 13.163321)
Could you comment where the problem would be?
I already use the latest code :
commit 631a966891885643f180e18e94870411b8f4c3fc (HEAD -> master, tag: bmi08x_v1.5.8, origin/master, origin/HEAD)
Author: Bosch Sensortec <github@bosch-sensortec.com>
Date: Wed Mar 16 19:34:09 2022 +0100
Fixed bugs related to config file loads on certain platforms.
Thanks
-Austin
03-23-2022 02:20 PM
04-02-2022 07:45 AM
Thanks. The problem is in our bmi08x->write hook which needs some delay to ensure the massive write (46bytes) are actually written into the chip.
04-13-2022 10:37 AM
Welcome, ysqcn.