07-07-2021 02:08 PM
Hello,
first I would like to describe our setup, questions are in the bottom bold.
We are executing reboot test on our i.MX6 linux based board with BMI270. Our modified linux driver is based on BMI2xy Linux Driver from Bosch Sensortec GmbH. Test application is reading GYRO/ACCEL data from BMI270 and if they are non zero i.MX6 machine is re-booted, if they are zero test is stopped. BMI270 stays powered during i.MX6 reboot and we are using FIFO for retrieving data via SPI @ 5MHz.
Following data are send to BMI during initialization:
1. read BMI2_CHIP_ID_ADDR, if chip_id != 0x24 return error
2. send bmi270_config_file
3. our set up code:
/* Turn on FIFO for GYRO and ACC */
bmi2_set_adv_power_save(0, &client_data->device);
bmi2_set_fifo_config(BMI2_FIFO_GYR_EN | BMI2_FIFO_ACC_EN, 1, &client_data->device);
/* enable GYRO and ACC */
reg_data = 0x6; /* Turn on GYRO and ACC */
bmi2_set_regs(BMI2_PWR_CTRL_ADDR, ®_data, 1, &client_data->device);
reg_data = 0x0; /* PWR_CONF - disable Advanced power save*/
bmi2_set_regs(BMI2_PWR_CONF_ADDR, ®_data, 1, &client_data->device);
reg_data = 0xe;
bmi2_set_regs(BMI2_INT1_IO_CTRL_ADDR, ®_data, 1, &client_data->device);
reg_data = 0xf;
bmi2_set_regs(BMI2_INT_MAP_DATA_ADDR, ®_data, 1, &client_data->device);
reg_data = WATERMARK_SIZE >> 8;
bmi2_set_regs(BMI2_FIFO_WTM_1_ADDR, ®_data, 1, &client_data->device);
reg_data = WATERMARK_SIZE & 0xff;
bmi2_set_regs(BMI2_FIFO_WTM_0_ADDR, ®_data, 1, &client_data->device);
reg_data = 0xa8;
bmi2_set_regs(BMI2_GYR_CONF_ADDR, ®_data, 1, &client_data->device);
reg_data = 0xa8;
bmi2_set_regs(BMI2_ACC_CONF_ADDR, ®_data, 1, &client_data->device);
Test app was stopped at 397 reboot we've found out that FIFO was disabled but interrupts were generated. When FIFO was enabled by hand by writing echo 1 > acc_fifo_enable everything worked.
Is there a case when FIFO for GYRO and ACC is automatically disabled ?
Is Errata for BMI270 available ?
Thanks.
07-07-2021 04:30 PM
Hello joma,
We could confirm FIFO will not disable itself. There was BMI270 example code in github, you could refer the code for sensor configuration.
https://github.com/BoschSensortec/BMI270-Sensor-API/tree/master/examples/bmi270/fifo_watermark_heade...