We are using BMXO55 sensor. Currently, we are trying to implement accelerometer self-test.
According to the procedure mentioned in the datasheet, we are following these steps.
1. Set the g-range to 8g, using the PMU_RANGE (0x0F) register value was set to 8.
2. To do a test on the x-axis in a positive direction, PMU_SELF_TEST (0x32) register value was set to 21;
After reading after 50ms, it shows a raw value of -0.00390625 in x-axis.
The same procedure was followed to test the x-axis in the negative direction, by setting PMU_SELF_TEST (0x32) register value was set to 17.
It resulted in the same value ( -0.00390625 ) as in a positive direction.
We also tried reading the value of the PMU_SELF_TEST register after setting its value to 21/17, it always gives zero.
Could someone please explain, why we are seeing this behavior?
Thanks and best regards,
The overall procedue looks OK.
it should be as following:
1. Enable acceleration sensor (by default enabled after power up the sensor)
2. Set to 8G range
3. enable self test for x-axis with 21
4. wait 50 ms to read data
5. enable self test for x-axis with 17
6. wait 50 ms to read data
Then calculate the difference between two read.
Back to your case, i have two comments:
1. please make sure the accel is in normal mode before self test (Accel 0x11 register with 0x00)
2. the read back value from 0x32 should be same as you write. if you always read as 0 means sensor is in deep suspend mode