09-23-2021 03:55 PM
Hello everyone,
There seems to be a bug in the BOSCH library for BMA456, exactly in the bma456h.c file. When I am trying to configure the auto low power mode settings of the accelerometer, the changes are never supposed to be applied; for example, time_out_dur and lp_odr parameters stay default.
Here is a piece of my project source code, where the auto low power mode settings are done. Though there is an effort to set time_out_dur parameter to 3 seconds amd lp_odr to 12,5 Hz, the device still runs with settings of 2 seconds timeout and ODR of 6,25 Hz, which are the default values for the corresponding parameters.
With another settings applied, the same issue is being faced.
Even if I try to change an offset of this configuration BMA456H_AUTO_LOW_POWER_OFFSET to absolutely random hex values, I get the same results! How is that possible?
/* Enable auto low power feature */
struct bma4_dev bma = {0};
struct bma456h_auto_low_power balp = {0};
...
int8_t rslt;
...
rslt = bma456h_feature_enable(BMA456H_AUTO_LOW_POWER_EN, BMA4_ENABLE, &bma);
rslt = bma456h_get_auto_low_power_config(&balp, &bma);
if (rslt == BMA4_OK) {
balp.lp_odr = 3;
balp.no_motion = 0;
balp.time_out = 1;
balp.time_out_dur = 150;
balp.pwr_mgt = 1;
rslt = bma456h_set_auto_low_power_config(&balp, &bma);
}
}
Does anyone have an idea about what could go wrong? Or did anyone face the same issue?
Regards,
Roman.
09-24-2021 04:07 AM
Hello keizerr,
Could we know what is your application first?
There are bma456.c(.h) and bma456h.c(.h) BMA456 driver code in github. bma456.c(.h) focus on wearable applicatoin, bma456h.c(.h) focus on hearable application. You could choose different driver code(bma456.x or bma456h.x) according your application.
09-24-2021 08:37 AM
Hello BSTRobin,
My application is the detector of whether the car is currently driving, actively parking or standing still. Seems to be quite simple, though some problems are always present. The application has to be as low-power as possible, so I need the accelerometer to be sleeping as much as possible.
That is why I need the auto low power mode of BMA456, which I have to configure with the settings stated in the post. There is currently no ability to do that though.
The accelerometer has to wake up when acceleration data goes over the preset threshold (any_motion feature). And has to fall asleep if no any_motion event is detected for 3 seconds (already the auto low power settings).
Also, I need FIFO to read out the data (in both low-power and normal modes).
And that's it!
So, could you please help me with my issue?
Regards,
Roman.
11-03-2021 07:32 AM
Hello keizerr,
Did you run auto low power example?
https://github.com/BoschSensortec/BMA456-Sensor-API/blob/master/examples/bma456h/generic/auto_low_po...