Skip to main content
VJaha.1
Associate
July 28, 2021
Question

IIS2DPC getting Status=0x21 X=476, Y=52676, Z=10472 with no trigger to the sensor. On the slightest tap, the value shoots to 64K

  • July 28, 2021
  • 2 replies
  • 919 views

0693W00000D0q2zQAB.pngMy Senosr board is on the table with no vibration event applied to it. Instead of seeing a value of zero or something close to zero, I am reading the X, Y, Z values as ( X=476, Y=52676, Z=10472).

What is the issue here and how to fix it?

My Setting is as follows:

 iis2dlpc_full_scale_set(&dev_ctx, IIS2DLPC_16g); // CTRL6
 
 iis2dlpc_filter_path_set(&dev_ctx, IIS2DLPC_LPF_ON_OUT); // CTRL6 & 7
 
 iis2dlpc_filter_bandwidth_set(&dev_ctx, IIS2DLPC_ODR_DIV_20); // CTRL 6
 
 iis2dlpc_power_mode_set(&dev_ctx, IIS2DLPC_CONT_LOW_PWR_LOW_NOISE_4); //CTRL1 & 6
 
 iis2dlpc_wkup_dur_set(&dev_ctx, 2);
 
 iis2dlpc_act_sleep_dur_set(&dev_ctx, 2);
 
 iis2dlpc_wkup_threshold_set(&dev_ctx, 2);
 
 iis2dlpc_wkup_feed_data_set(&dev_ctx, IIS2DLPC_HP_FEED);
 
 iis2dlpc_act_mode_set(&dev_ctx, IIS2DLPC_DETECT_ACT_INACT);
 
 iis2dlpc_pin_int1_route_get(&dev_ctx, &int_route.ctrl4_int1_pad_ctrl);
 
 int_route.ctrl4_int1_pad_ctrl.int1_wu = PROPERTY_ENABLE;
 
 iis2dlpc_pin_int1_route_set(&dev_ctx, &int_route.ctrl4_int1_pad_ctrl);
 
 iis2dlpc_data_rate_set(&dev_ctx, IIS2DLPC_XL_ODR_12Hz5);

This topic has been closed for replies.

2 replies

TBomb.1
Visitor II
July 28, 2021

Hi, are you in high resolution (14 bit) or in Low power mode (12 bit)?

And also are you sure you are correctly concatenating the OUT_axis_L and OUT_axis_H data? Could you share the hex values?

Tom

VJaha.1
VJaha.1Author
Associate
July 28, 2021

Hi,

I am in Low Power mode `IIS2DLPC_CONT_LOW_PWR_LOW_NOISE_4`

The Values for the LA are as follows {x_l:28, x_h:29, y_l:2a, y_h:2b, z_l:2c, z_h:2d}:

type     , "ack" , "address" , "read" , "data"

"start"  ,      ,          ,       ,       

"address" , true , 0x19     , false , 

"data"   , true ,          ,       , 0x28

"stop"   ,      ,          ,       ,       

"start"  ,      ,          ,       ,       

"address" , true , 0x19     , true  , 

"data"   , true ,          ,       , 0xDC

"data"   , true ,          ,       , 0x01

"data"   , true ,          ,       , 0xC8

"data"   , true ,          ,       , 0xCD

"data"   , true ,          ,       , 0xE8

"data"   , true ,          ,       , 0x28

"data"   , false ,          ,       , 0xDC

"stop"   ,      ,          ,       ,       

~                                            

x= 0x01dc =476

y= 0xcdc8 = 52680

z= 0x28e8 =10472