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.
07-09-2019 11:40 PM
Did you call the following API funciton in your code:
1. bma423_init
2. bma423_write_config_file
3. bma423_select_platform
4. bma423_stepcounter_set_parameter
Those functions should be called before the "bma423_feature_enable(BMA423_STEP_CNTR,BMA4_ENABLE,&dev);"
07-10-2019 03:57 PM
Hello Vincent,
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.
07-11-2019 10:18 AM
Please refer to BMA423 API README file to configure:
https://github.com/BoschSensortec/BMA423-Sensor-API/blob/master/README.md
07-26-2019 12:14 AM - edited 07-26-2019 12:15 AM
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?