07-09-2019 08:08 PM - edited 07-09-2019 08:09 PM
Hello,
I am working with the BMA423 accelerometer and trying to use the step counter feature.I was able to get the chip id and have verified the chip by running the self test.I am using the driver from github and doing the following to enable and get output of the step counter feature.
rslt |= bma4_set_accel_enable(BMA4_ENABLE, &dev);
rslt |=bma4_set_accel_config(&accel_conf, &dev);
rslt |= bma423_feature_enable(BMA423_STEP_CNTR,BMA4_ENABLE,&dev);
rslt |= bma423_reset_step_counter(&dev);
rslt |= bma423_step_counter_output(&step_count , &dev);
The step counter output for the first time is 00 which is correct.After this, I am trying to get the step counter output in a loop while moving the accelerometer.I get random values out of the Step_counter registers.I am not sure why. Is there anything that looks incorrect for using the step counter feature?
Thank you.
08-02-2019 09:12 PM
The step counter register is providing the actual steps you are moving.
You can try to reset the step counter then walking for while then compare the step counter register value with your ground truth.
To make sure the step counter feature working properly, the configure string should be download correctly, sensor should be put into normal or low power mode with at least 25Hz ODR.