LIS2DW12 stationary/motion INT pin not automatically deasserted (reset) after 1/ODR interval
Hi.
I'm working with LIS2DW12 and setting it to work in stationary/motion detection. The Wake-up interrupt is driven to INT1 pin. However, when observing the signal of INT1 with logic analyzer, when the sensor is moving, having acceleration higher than threshold, I can see that the INT1 pin goes to high state for a period of time longer than 1/ODR.
According to the application note AN5038, in activity/inactivity-stationary/motion detection mode, the WU_IA event (which is driven to INT1) should be automatically reset after an interval of 1/ODR.
I implement the code based on the provided example lis2dw12_activity.c by ST. Here is my code:
Initialization:
lis2dw12_device_id_get(&lis2dw12_dev, &whoamI);
lis2dw12_reset_set(&lis2dw12_dev, PROPERTY_ENABLE);
lis2dw12_block_data_update_set(&lis2dw12_dev, PROPERTY_ENABLE);
lis2dw12_int_notification_set(&lis2dw12_dev, LIS2DW12_INT_PULSED);
lis2dw12_data_rate_set(&lis2dw12_dev, LIS2DW12_XL_ODR_OFF);Setting stationary/motion detection:
lis2dw12_full_scale_set(&lis2dw12_dev, LIS2DW12_2g);
lis2dw12_power_mode_set(&lis2dw12_dev,LIS2DW12_CONT_LOW_PWR_12bit);
lis2dw12_delay_ms(80);
lis2dw12_data_rate_set(&lis2dw12_dev,LIS2DW12_XL_ODR_12Hz5);
lis2dw12_filter_path_set(&lis2dw12_dev, LIS2DW12_HIGH_PASS_ON_OUT);
lis2dw12_wkup_dur_set(&lis2dw12_dev, 0);
lis2dw12_act_sleep_dur_set(&lis2dw12_dev, 0);
lis2dw12_wkup_threshold_set(&lis2dw12_dev, ths);
lis2dw12_act_mode_set(&lis2dw12_dev, LIS2DW12_DETECT_STAT_MOTION);
lis2dw12_pin_int1_route_get(&lis2dw12_dev, &int_route.ctrl4_int1_pad_ctrl);
int_route.ctrl4_int1_pad_ctrl.int1_wu = PROPERTY_ENABLE;
lis2dw12_pin_int1_route_set(&lis2dw12_dev, &int_route.ctrl4_int1_pad_ctrl);
lis2dw12_delay_ms(80);