fxas21002c: Calibration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fxas21002c: Calibration

870 Views
gangadhargangu
Contributor I

#fxas21002c #IIO

 

Hi All,

 

Are my below calibration values correct?

 

1. Referring to Page 40 of FXAS21002C datasheet, 

 

#define FS_AVL_2000_GAIN 1090

#define FS_AVL_1000_GAIN   545

#define FS_AVL_500_GAIN     272

#define FS_AVL_250_GAIN     136

 

 

1090 is degrees to radians convertion of 62500. I'm using this value as senstivity mentioned is 62.5 mdps/LSB.

 

static IIO_CONST_ATTR(in_gyro_scale_available, "0.001090 0.000545 0.000272 0.000136"); ---> These are macro values of above #defines

 

static struct attribute *fxas2100x_attributes[] = {

&iio_const_attr_sampling_frequency_available.dev_attr.attr,

&iio_const_attr_in_gyro_scale_available.dev_attr.attr,

NULL,

};

 

2. I'm using Android 6.1 Marshmallow and below hrec file. I chose some values based on my understanding from datasheet, remaining I copied from a different gyro hrec. Are the chosen values correct? Please suggest correct values.

ro. iio.anglvel.max_range=30 -------------------------------> copied from a different part.

ro. iio.anglvel.resolution=0.001 -----------------------------> This value I took from sensitivity as it is mentioned to be mdps/LSB

ro. iio.anglvel.power=3 ------------> Copied from different gyro

ro. iio.anglvel.scale=0.000545 -----> Micro value of the gain that I'm using

ro. iio.anglvel.quirks=hrtimer noisy biased

ro. iio.anglvel.max_freq=100 ---------------> copied from a different gyro

 

Regards,

Gangadhar

Labels (1)
0 Kudos
1 Reply

549 Views
yonghuiyang
NXP Employee
NXP Employee

Hi Gangadhar,

The first item, I think, is correct.

The second item, I think, is the code in HAL, right? Current we don't have the HAL code for supporting IIO framework. And different vendor may wrote HAL in different ways. As we don't have your whole HAL code, I can't say if this is correct or not.

But one thing is that you already convert the gyro output to rad per second in your kernel driver, then the unit for resolution should be rad per second, not dps.

ro. iio.anglvel.max_range=2000      // if the unit of range is dps

ro. iio.anglvel.max_freq=800

Thanks,

Yonghui

0 Kudos