Hi,
Thanks for your inquiry.
BMI160 has built-in self-test feature for accelerometer and gyroscope. This is to check if the sensor is working properly or not after PCB assembly. It has nothing to do with calibration.
Gyro calibration is relatively simple. You can place your device stationary on a table at any orientation and then click "Gyro calibration" button. If you configure BMI160 gyro to 100Hz normal mode, then you can set up a counter for 1000 samples which is about 10 seconds long. After the counter reaches 1000, you can display "Gyro calibration is done". Then you can average these 1000 gyro data samples to get the offsets for x/y/z axes. In the future all gyro raw data should subtract these offsets to get calibrated values. This means that when your device is stationary gyro x/y/z data should be all around 0 dps (degree per second). If you also want to calibrate gyro x/y/z sensitivities, then you will need a turn table and this becomes complicated.
Accel calibration is to convert BMI160 accel x/y/z data to align with your device X/Y/Z axes, because BMI160 x/y/z axes will be invisible inside your device. Now you can click "Accel calibration" button and display "Please place device X axis pointing up". Then you can click "Start" button to collect BMI160 accel x/y/z data for 300 samples for example. If you configure BMI160 accel to 100Hz normal mode, then it will take about 3 seconds. When the counter reaches 300, you can click "Stop" button. Now you can average these 300 data samples to get accel x/y/z data at Z_up position. Then you can repeat the above process for Z_down, X_up, X_down, Y_up and Y_down the other 5 positions. Then you can search accelerometer calibration application note or code sample online about how to obtain accel 3 offsets and 3x3 sensitivity matrix calibration parameters from the above data sets you have collected. Then you can display "Accel calibration is done". In the future you need to apply these accel calibration parameters to all BMI160 accel raw data. Therefore, when you place any device axis X/Y/Z to up or down position, you should get +1g or -1g values after calibration.
Thanks.
... View more