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?
Did you call the following API funciton in your code:
Those functions should be called before the "bma423_feature_enable(BMA423_STEP_CNTR,BMA4_ENABLE,&dev);"
Thank you for the reply. Since the default setting is wrist, I was not setting them.I will set them and try again. My issue is the step counter outputs 0x1E after reset without any movements.
Thank you for the replies.
I have followed the git-hub instruction and this time I have set the param and platform.The value of the 32bit stepcounter is 0x00010000 without any motion. Does this value look correct? Do I need process this data or the stepcounter suppose to give the actual step counts?