AnsweredAssumed Answered

LSM303AGR INT1 / INT2 unable to make it work

Question asked by David LR on Jun 26, 2018
Latest reply on Jul 13, 2018 by Miroslav B

After properly setting up i2c with my choice MCU, INT1 is never fired. (I have tested with logic analyzer and INT1 pin is always low, and its configured as active high) 


lsm303agr_xl_block_data_update_set(&dev_ctx_xl, PROPERTY_ENABLE);
lsm303agr_xl_data_rate_set(&dev_ctx_xl, LSM303AGR_XL_ODR_10Hz);
lsm303agr_xl_full_scale_set(&dev_ctx_xl, LSM303AGR_2g);
lsm303agr_xl_operating_mode_set(&dev_ctx_xl, LSM303AGR_LP_8bit);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_CTRL_REG1_A, (uint8_t*) 0x97, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_CTRL_REG3_A, (uint8_t*) 0x60, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_CTRL_REG6_A, (uint8_t*) 0x02, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_CTRL_REG5_A, (uint8_t*) 0x00, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_INT1_CFG_A, (uint8_t*) 0x2A, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_INT1_THS_A, (uint8_t*) 0x64, 1);
lsm303agr_write_reg(&dev_ctx_xl, LSM303AGR_INT1_DURATION_A, (uint8_t*) 0x01, 1);

lsm303agr_xl_high_pass_int_conf_set(&dev_ctx_xl, LSM303AGR_DISC_FROM_INT_GENERATOR);

With ST standard C drivers, I can set up registers and read back checking it have the correct values.


So my question is, There is any workflow diagram on how to properly set up INT1 after a threshold in movements?


I have tested all possible combinations on interrupt sources (AOI, X/Y/Z Higher than, X/Y/Z lower than...) and INT1 is always low. Interrupts are enabled and not latched. No filter, high frequency filter set, threshold set/ not set.... 


I am not reading the discrete values of XL or MAG axis, only trying to interrupt, so its possible the LSM303AGR is in some low power and not firing it up if I dont read the axis values? Can it be a wrong set up of high frequency filter to eliminate gravity and static accelerations??


I have tested at this point a A LOT of configurations without any result. At las instance, do you guys have any working piece of code with registers configuration that make INT1 interrupt fire, just to debug and trying to figure what I am doing wrong.


Thanks a lot!!