08-24-2022 11:10 AM
Hi, Bosch
The initial setting referred to bma2x2_support.c within the github.
com_rslt += bma2x2_set_power_mode(BMA2x2_MODE_NORMAL);
bw_value_u8 = 0x08;/* set bandwidth of 7.81Hz*/
com_rslt += bma2x2_set_bw(bw_value_u8);
After setting it as above, I read the value in the API below.
com_rslt = bma2x2_read_read_sample_xyzt(&sample_xyzt);
Below is the result of reading the accel value from BMA253.
The environment is stably placed in a horizontal position on the desk.
I (24872) bma253: AccXYZ (00212,00016,04072), Temperature (00006)
I (25074) bma253: AccXYZ (00188,-0020,03916), Temperature (00006)
I (25274) bma253: AccXYZ (00176,00140,03944), Temperature (00006)
I (25474) bma253: AccXYZ (00132,00076,03836), Temperature (00006)
I (25676) bma253: AccXYZ (00176,00164,04080), Temperature (00006)
I(25876) bma253: AccXYZ(00200,00128,04424),temp(00006)
I (26076) bma253: AccXYZ (00128,00100,04188), Temperature (00006)
I (26278) bma253: AccXYZ (00172,00092,03920), Temperature (00006)
I (26478) bma253: AccXYZ (00208,00212,03748), Temperature (00006)
I (26678) bma253: AccXYZ (00240,00168,04096), Temperature (00006)
I (26878) bma253: AccXYZ (00216,00136,04048), Temperature (00006)
I (27080) bma253: AccXYZ (00248,00108,03968), Temperature (00006)
I (27280) bma253: AccXYZ (00248,00112,04092), Temperature (00006)
I (27482) bma253: AccXYZ (00136,00168,04172), Temperature (00006)
I (27682) bma253: AccXYZ (00132,00164,04180), Temperature (00006)
I (27882) bma253: AccXYZ (00184,00096,03912), Temperature (00006)
I (28084) bma253: AccXYZ (0024,00024,03784), Temperature (00006)
I (28284) bma253: AccXYZ (00288,00040,03812), Temperature (00006)
I (28482) bma253: AccXYZ (00236,00036,04092), Temperature (00006)
I (28682) bma253: AccXYZ (00212,00228,04340), Temperature (00006)
I (2884) bma253: AccXYZ (00204,00088,04184), Temperature (00006)
I (29082) bma253: AccXYZ (00212,-0104,04008), Temperature (00006)
I (29282) bma253: AccXYZ (00204,-0048,03956), Temperature (00006)
I (29484) bma253: AccXYZ (00124,00060,03940), Temperature (00006)
I (29684) bma253: AccXYZ (00136,00064,04036), Temperature (00006)
I (29884) bma253: AccXYZ (00200,-0012,03860), Temperature (00006)
I (30086) bma253: AccXYZ (00268,-0024,03724), Temperature (00006)
I (30286) bma253: AccXYZ (00196,-0088,04236), Temperature (00006)
I (30486) bma253: AccXYZ (00192,00200,04412), Temperature (00006)
I (30688) bma253: AccXYZ (00132,00132,04108), Temperature (00006)
I (30886) bma253: AccXYZ (00184,00080,03960), Temperature (00006)
I (31086) bma253: AccXYZ (00184,00060,04020), Temperature (00006)
I (31288) bma253: AccXYZ (00116,00008,04032), Temperature (00006)
The X and Y values are positive, and for Y values, the sign waveform is similar.
In addition, the deviation of the X value fluctuates a lot compared to the BMI 160.
Below is the result of reading the accel value from BMI160.
It is located next to BMA253.
I(66211986) bmi160: AccXYZ(-0876,-0296,16585), GyrXYZ(00022,-0051,-0055)
I(66212186) bmi160: AccXYZ(-0863,-0237,1669) GyrXYZ(00004,-0054,-0059)
I(66212388) bmi160: AccXYZ(-0830,-0295,16574), GyrXYZ(00008,-0037,-0062)
I (66212586) bmi160 : AccXYZ (-0867,-0264,16559), GyrXYZ (00014,-0052,-0055)
I(66212788) bmi160: AccXYZ(-0850,-0271,16574), GyrXYZ(00006,-0040,-0056)
I(66212988) bmi160: AccXYZ(-0871,-0305,1669) GyrXYZ(00010,-0042,-0061)
I(66213188) bmi160: AccXYZ(-0866,-0281,16530), GyrXYZ(00020,-0037,-0060)
The value is constant without significant deviations.
It is urgent that the mass-produced products cannot be delivered due to this problem.
Solved! Go to Solution.
08-25-2022 07:39 AM
Hi mgchoi,
From your data log, the z-axis data is out of the sensor range.
You need to set sensor range in your code.
08-25-2022 07:57 AM
Thanks BSTRobin
I'll check that code
09-23-2022 09:18 AM
Welcome, mgchoi.
Did it work well?
09-26-2022 02:18 AM
Yes, it works well. I think it was a range problem.