Here is a short example made under COINES, the programable UI from our website.
data = 0xB6;
rslt = bmi160_set_regs(BMI160_COMMAND_REG_ADDR, &data, 1, &bmi160dev);
coines_delay_msec(200);
rslt = bmi160_get_regs(BMI160_PMU_STATUS_ADDR, &data, 1, &bmi160dev);
printf("power status is 0x%X\n", data);
data = 0x11;
rslt = bmi160_set_regs(BMI160_COMMAND_REG_ADDR, &data, 1, &bmi160dev);
coines_delay_msec(65);
rslt = bmi160_get_regs(BMI160_PMU_STATUS_ADDR, &data, 1, &bmi160dev);
printf("power status is 0x%X\n", data);
From the result, you can see the power mode are successfully changed after softrest.
If you still have problem using softrest, please post your source code here. 🙂
... View more