AnsweredAssumed Answered

Fxas21002 Validation

Question asked by Deepanraj Anbarasan on Sep 5, 2017
Latest reply on Sep 7, 2017 by Deepanraj Anbarasan

Hi,

 

We are currently working on imx6 based custom board and we have mounted NXP's Fxas21002 gyroscope.we have developed a simple application just to get the x-axis ,y-axis and z-axis value from the sensor.But we are not sure what is the raw value obtained from the x,y and z axis.We know that gyroscope gives the value in radian/sec.But in gyroscope driver we have set the CTRL_REG0 as 0x03 so that the sensitivity is 250 and the CTRL_REG1 set the bandwidth as 200hz.We are not getting proper value for the gyroscope.What is the proper register setting which is need to be done in the driver to get proper value.Please anyone support and provide a solution

 

The value obtained when we run evtest application is

Event: time 1486120109.073494, type 3 (EV_ABS), code 0 (ABS_X), value 53
Event: time 1486120109.073494, type 3 (EV_ABS), code 1 (ABS_Y), value 80
Event: time 1486120109.073494, type 3 (EV_ABS), code 2 (ABS_Z), value 64
Event: time 1486120109.073494, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120109.473445, type 3 (EV_ABS), code 0 (ABS_X), value 74
Event: time 1486120109.473445, type 3 (EV_ABS), code 1 (ABS_Y), value 26
Event: time 1486120109.473445, type 3 (EV_ABS), code 2 (ABS_Z), value 28
Event: time 1486120109.473445, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120109.873534, type 3 (EV_ABS), code 0 (ABS_X), value 108
Event: time 1486120109.873534, type 3 (EV_ABS), code 1 (ABS_Y), value 84
Event: time 1486120109.873534, type 3 (EV_ABS), code 2 (ABS_Z), value 53
Event: time 1486120109.873534, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120110.273442, type 3 (EV_ABS), code 0 (ABS_X), value 41
Event: time 1486120110.273442, type 3 (EV_ABS), code 1 (ABS_Y), value 22
Event: time 1486120110.273442, type 3 (EV_ABS), code 2 (ABS_Z), value -9
Event: time 1486120110.273442, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120110.673430, type 3 (EV_ABS), code 0 (ABS_X), value 100
Event: time 1486120110.673430, type 3 (EV_ABS), code 1 (ABS_Y), value -31
Event: time 1486120110.673430, type 3 (EV_ABS), code 2 (ABS_Z), value 12
Event: time 1486120110.673430, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120111.073454, type 3 (EV_ABS), code 0 (ABS_X), value 55
Event: time 1486120111.073454, type 3 (EV_ABS), code 1 (ABS_Y), value 57
Event: time 1486120111.073454, type 3 (EV_ABS), code 2 (ABS_Z), value -30
Event: time 1486120111.073454, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120111.473444, type 3 (EV_ABS), code 0 (ABS_X), value 92
Event: time 1486120111.473444, type 3 (EV_ABS), code 1 (ABS_Y), value 56
Event: time 1486120111.473444, type 3 (EV_ABS), code 2 (ABS_Z), value 61
Event: time 1486120111.473444, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120111.873498, type 3 (EV_ABS), code 0 (ABS_X), value 53
Event: time 1486120111.873498, type 3 (EV_ABS), code 1 (ABS_Y), value 38
Event: time 1486120111.873498, type 3 (EV_ABS), code 2 (ABS_Z), value 8
Event: time 1486120111.873498, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120112.273517, type 3 (EV_ABS), code 0 (ABS_X), value 82
Event: time 1486120112.273517, type 3 (EV_ABS), code 1 (ABS_Y), value 8
Event: time 1486120112.273517, type 3 (EV_ABS), code 2 (ABS_Z), value 13
Event: time 1486120112.273517, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120112.673478, type 3 (EV_ABS), code 0 (ABS_X), value 35
Event: time 1486120112.673478, type 3 (EV_ABS), code 1 (ABS_Y), value 30
Event: time 1486120112.673478, type 3 (EV_ABS), code 2 (ABS_Z), value -11
Event: time 1486120112.673478, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120113.073434, type 3 (EV_ABS), code 0 (ABS_X), value 123
Event: time 1486120113.073434, type 3 (EV_ABS), code 1 (ABS_Y), value 44
Event: time 1486120113.073434, type 3 (EV_ABS), code 2 (ABS_Z), value 11
Event: time 1486120113.073434, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120113.473515, type 3 (EV_ABS), code 0 (ABS_X), value 120
Event: time 1486120113.473515, type 3 (EV_ABS), code 1 (ABS_Y), value 15
Event: time 1486120113.473515, type 3 (EV_ABS), code 2 (ABS_Z), value 9
Event: time 1486120113.473515, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120113.873509, type 3 (EV_ABS), code 0 (ABS_X), value 131
Event: time 1486120113.873509, type 3 (EV_ABS), code 1 (ABS_Y), value 103
Event: time 1486120113.873509, type 3 (EV_ABS), code 2 (ABS_Z), value 23
Event: time 1486120113.873509, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120114.273455, type 3 (EV_ABS), code 0 (ABS_X), value 91
Event: time 1486120114.273455, type 3 (EV_ABS), code 1 (ABS_Y), value 49
Event: time 1486120114.273455, type 3 (EV_ABS), code 2 (ABS_Z), value 30
Event: time 1486120114.273455, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120114.673439, type 3 (EV_ABS), code 0 (ABS_X), value 53
Event: time 1486120114.673439, type 3 (EV_ABS), code 1 (ABS_Y), value 25
Event: time 1486120114.673439, type 3 (EV_ABS), code 2 (ABS_Z), value 25
Event: time 1486120114.673439, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120115.073459, type 3 (EV_ABS), code 0 (ABS_X), value 134
Event: time 1486120115.073459, type 3 (EV_ABS), code 1 (ABS_Y), value 41
Event: time 1486120115.073459, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120115.473470, type 3 (EV_ABS), code 0 (ABS_X), value 76
Event: time 1486120115.473470, type 3 (EV_ABS), code 1 (ABS_Y), value 13
Event: time 1486120115.473470, type 3 (EV_ABS), code 2 (ABS_Z), value 14
Event: time 1486120115.473470, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120115.873476, type 3 (EV_ABS), code 0 (ABS_X), value 96
Event: time 1486120115.873476, type 3 (EV_ABS), code 1 (ABS_Y), value 28
Event: time 1486120115.873476, type 3 (EV_ABS), code 2 (ABS_Z), value 19
Event: time 1486120115.873476, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120116.273461, type 3 (EV_ABS), code 0 (ABS_X), value 83
Event: time 1486120116.273461, type 3 (EV_ABS), code 1 (ABS_Y), value 5
Event: time 1486120116.273461, type 3 (EV_ABS), code 2 (ABS_Z), value 11
Event: time 1486120116.273461, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120116.673425, type 3 (EV_ABS), code 0 (ABS_X), value 3811
Event: time 1486120116.673425, type 3 (EV_ABS), code 1 (ABS_Y), value -8997
Event: time 1486120116.673425, type 3 (EV_ABS), code 2 (ABS_Z), value 1209
Event: time 1486120116.673425, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120117.073436, type 3 (EV_ABS), code 0 (ABS_X), value -2597
Event: time 1486120117.073436, type 3 (EV_ABS), code 1 (ABS_Y), value -23852
Event: time 1486120117.073436, type 3 (EV_ABS), code 2 (ABS_Z), value 3396
Event: time 1486120117.073436, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120117.473446, type 3 (EV_ABS), code 0 (ABS_X), value 855
Event: time 1486120117.473446, type 3 (EV_ABS), code 1 (ABS_Y), value -8610
Event: time 1486120117.473446, type 3 (EV_ABS), code 2 (ABS_Z), value 5169
Event: time 1486120117.473446, -------------- SYN_REPORT ------------
********Inside ret******
Event: time 1486120117.873502, type 3 (EV_ABS), code 0 (ABS_X), value 92
Event: time 1486120117.873502, type 3 (EV_ABS), code 1 (ABS_Y), value 50
Event: time 1486120117.873502, type 3 (EV_ABS), code 2 (ABS_Z), value 33

 

 

Thank you,

Deepanraj.A

Outcomes