01-12-2024 06:02 PM - edited 04-17-2024 10:09 AM
We have a device with a BMI270 inside, and we calibrate it in factory. Few products fails factory gyro calibration test, returning values outside our hard-coded [-1.0..+1.0] dps bounds despite board being in a stable environment. Accel bounds check works very well.
I performed a stress test on a table. A good product shows small jittter for gyro after a hundred of loops:
And a buggy product crashes the test on first measurement loop due to an out-of-bounds gyro value :
Actually, rX is almost always insane, with values up to 6 dps idle, rZ is regularly insane on 1.0 borders and rY is quite ok.
To my knowledge both products are simular, running same software based on BMI270-Sensor-API 2.71.8.
For the shake of completness, here is the diff of a dump from a good device to a bad device executed after thoses tests. Good device gyro is -0.1/0.1/-0.2 whereas bad device gyro is -2.0/0.5/-0.5 dps if I am not wrong at manually reading config (0x42 and 0x43) and values (0x12..0x17).
sh-4.3# i2cdump -y 1 0x68 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef -00: 24 21 00 d0 00 00 00 00 00 00 00 00 c6 ff bf ff $!.?........?.?.
+00: 24 21 00 10 00 00 00 00 00 00 00 00 45 00 85 fe $!.?........E.??
-10: 1b 40 fe ff 02 00 fd ff fb ff 03 00 00 00 00 00 ?@?.?.?.?.?.....
+10: d7 40 df ff 08 00 f6 ff fb bf 19 00 00 00 00 00 ?@?.?.?.???.....
20: 18 01 00 80 00 00 00 f7 01 25 00 fc 01 00 00 01 ??.?...??%.??..? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40: aa 00 aa 00 46 88 00 02 00 00 00 20 83 42 4c 02 ?.?.F?.?... ?BL? 50: 00 00 00 00 00 00 00 00 00 25 00 00 80 00 83 01 .........%..?.?? 60: 00 00 00 00 00 00 00 00 09 00 00 00 aa 00 00 00 ........?...?... -70: 28 00 04 00 01 00 01 40 00 00 00 01 03 00 00 00 (.?.?.?@...??...
+70: 28 00 f9 03 fe 00 ff 73 00 00 00 00 03 00 00 00 (.???..s....?...
Configuration is:
GYR_CONF 0x42 = 0xAA => ODR=400, osr2, norm-noise, perf-filter GYR_RANGE 0x43 = 0x00 => GYR_RANGE=+/-2000dps (4000 total => 16 LSB/dps), OIS_RANGE=+/-250dps
More strangely, deep debug traces show much stable (and better) gyro measures during calibration loop (bmi2_perform_gyro_foc), reading 0x12 as "f8ff0400f2ff" (-0.5/0.2/-0.8) for almost worst cases, using gyro configuration GYR_CONF 0x42=0xCA (ODR400 OSR4 noise-perf, filter-perf) GYR_RANGE 0x43 = 0x00.
If this gyro measurement disparity per chip is familiar to someone I will be glad to get hints. The same if dump shows something to someone. If needed, I can provide my deeper app logs but a little bit strong to read.
05-23-2024 03:03 PM
For a matter of follow-up: I plotted measurements on one failing board which shows a kind of 10x gain/noise on its Y gyro axis, still properly centered to zero. Changing gyro range from +/-2k dps to +/-500 dps does not help and self test returns no issues.