cancel
Showing results for 
Search instead for 
Did you mean: 

Can LIS2DW12 be configured to present TAP interrupt and to give XYZ acceleration values on demand at same time?

Diego Colombo
Associate III

Please,give me your opinion.

I have to develop an anti-tamper board.By now I was asked to select one of 2 working modes:

1)Interrupt on TAP

2)XYZ values on demand ,microcontroller periodically checks variations in XYZ values.

Is it possible to have both at same time?In other words,every second XYZ values are compared with some thresholds,but between measurements (or even during) if a TAP event occurs it must activate the INT pin.

Thanks.

Diego

1 ACCEPTED SOLUTION

Accepted Solutions
Diego Colombo
Associate III

Thank you Eleon

I already have a customer board to test your hints,by now my firmware works as described,I think it would not take long time to have both functionalities.

Thanks again,

Diego

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi Diego @Diego Colombo​ ,

yes it is possible to acquire the data and the interrupts together.

The interrupt event can be detected both at register level than at hardware level. If you want to run it in parallel with the data acquisition, you have to enable the interrupt routing on a physical pin, either INT1 or INT2

See for example the C sample code on Github --> lis2dw12_tap_single.c

  /* Enable single tap detection interrupt */
  lis2dw12_pin_int1_route_get(&dev_ctx, &int_route.ctrl4_int1_pad_ctrl);
  int_route.ctrl4_int1_pad_ctrl.int1_single_tap = PROPERTY_ENABLE;
  lis2dw12_pin_int1_route_set(&dev_ctx, &int_route.ctrl4_int1_pad_ctrl);

-Eleon

Diego Colombo
Associate III

Thank you Eleon

I already have a customer board to test your hints,by now my firmware works as described,I think it would not take long time to have both functionalities.

Thanks again,

Diego