Thank you very much. The following is the code in file of accel_gyro.c. As you can see write_config_file() is called in bmi270_init() which is before bmi270_sensor_enable() is called, while in bmi270_sensor_enable() , bmi2_set_adv_power_save() is called. does it mean my baseline software of bmi270 is wrong? { /* Status of api are returned to this variable. */ int8_t rslt; /* Variable to define limit to print accel data. */ uint16_t limit = 10000; /* Assign accel and gyro sensor to variable. */ uint8_t sensor_list[2] = { BMI2_ACCEL, BMI2_GYRO }; /* Sensor initialization configuration. */ struct bmi2_dev bmi2_dev; /* Create an instance of sensor data structure. */ struct bmi2_sens_data sensor_data = { { 0 } }; /* Initialize the interrupt status of accel and gyro. */ uint16_t int_status = 0; uint8_t indx = 1; float x = 0, y = 0, z = 0; int16_t angle_speed; /* Interface reference is given as a parameter * For I2C : BMI2_I2C_INTF * For SPI : BMI2_SPI_INTF */ rslt = bmi2_interface_init(&bmi2_dev); bmi2_error_codes_print_result(rslt); /* Initialize bmi270. */ rslt = bmi270_init(&bmi2_dev); bmi2_error_codes_print_result(rslt); if (rslt == BMI2_OK) { /* Accel and gyro configuration settings. */ rslt = set_accel_gyro_config(&bmi2_dev); bmi2_error_codes_print_result(rslt); if (rslt == BMI2_OK) { /* NOTE: * Accel and Gyro enable must be done after setting configurations */ rslt = bmi270_sensor_enable(sensor_list, 2, &bmi2_dev); bmi2_error_codes_print_result(rslt);
... View more