Hi developers,
I would like to implement the self-test feature for the IIM 42652. If I understood well, the self test response is the difference between data in sensor registers (ACCEL_DATA_X1, ACCEL_DATA_X0,..., GYRO_DATA_X1, GYRO_DATA_X0,...) when the self test is enabled and disabled:
<SELF-TEST RESPONSE = SENSOR OUTPUT WITH SELF-TEST ENABLED – SENSOR OUTPUT WITH SELF-TEST DISABLED>
By doing so, I receive this accelerometer data (all data in mgee).
2021-06-18 14:26:56,881 # Self test disabled: acc X = -7, acc Y = 214, acc Z = -963,
2021-06-18 14:26:56,897 # Self test enabled: acc X = 206, acc Y = 462, acc Z = -302,
2021-06-18 14:26:56,900 # self test response: X = 213, Y = 248, Z = 661
2021-06-18 14:26:56,903 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:26:58,139 # Self test disabled: acc X = -7, acc Y = 214, acc Z = -961,
2021-06-18 14:26:58,253 # Self test enabled: acc X = 207, acc Y = 461, acc Z = -299,
2021-06-18 14:26:58,275 # self test response: X = 214, Y = 247, Z = 662
2021-06-18 14:26:58,310 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:00,392 # Self test disabled: acc X = -6, acc Y = 215, acc Z = -962,
2021-06-18 14:27:00,505 # Self test enabled: acc X = 205, acc Y = 461, acc Z = -301,
2021-06-18 14:27:00,527 # self test response: X = 211, Y = 246, Z = 661
2021-06-18 14:27:00,561 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:02,641 # Self test disabled: acc X = -7, acc Y = 213, acc Z = -964,
2021-06-18 14:27:02,756 # Self test enabled: acc X = 205, acc Y = 459, acc Z = -302,
2021-06-18 14:27:02,778 # self test response: X = 212, Y = 246, Z = 662
2021-06-18 14:27:02,812 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:04,893 # Self test disabled: acc X = -8, acc Y = 214, acc Z = -962,
2021-06-18 14:27:05,007 # Self test enabled: acc X = 204, acc Y = 462, acc Z = -301,
2021-06-18 14:27:05,029 # self test response: X = 212, Y = 248, Z = 661
2021-06-18 14:27:05,063 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:07,144 # Self test disabled: acc X = -6, acc Y = 213, acc Z = -962,
2021-06-18 14:27:07,258 # Self test enabled: acc X = 206, acc Y = 463, acc Z = -301,
2021-06-18 14:27:07,280 # self test response: X = 212, Y = 250, Z = 661
2021-06-18 14:27:07,314 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:09,395 # Self test disabled: acc X = -7, acc Y = 214, acc Z = -961,
2021-06-18 14:27:09,509 # Self test enabled: acc X = 206, acc Y = 463, acc Z = -301,
2021-06-18 14:27:09,531 # self test response: X = 213, Y = 249, Z = 660
2021-06-18 14:27:09,565 # data generated: X = 15, Y = 21, Z = 72
2021-06-18 14:27:11,646 # Self test disabled: acc X = -5, acc Y = 213, acc Z = -961,
2021-06-18 14:27:11,760 # Self test enabled: acc X = 207, acc Y = 461, acc Z = -303,
2021-06-18 14:27:11,782 # self test response: X = 212, Y = 248, Z = 658
2021-06-18 14:27:11,817 # data generated: X = 15, Y = 21, Z = 72
As you may notice, there is a big difference between data with/without self-test feature. This leads me to two questions:
1. What is the significance of the values in registers (XA_ST_DATA, YA_ST_DATA, ZA_ST_DATA). They are static and do not change.
2. What may be the reason in this big data deviation? Is it a fault in the driver I am implementing or is it a hardware issue or other thing?
I am looking forward to your answer, and I am at your disposal for any additional information
Thanks in advance