Skip to main content
Visitor II
June 4, 2019
Question

LSM303AGR Magnetometer interrupt occurs on ODR(10Hz) set instead it should occur on value changed beyond Threshold(100) set.Please see my magnetometer Register configurations

  • June 4, 2019
  • 0 replies
  • 675 views

I have taken LSM303AGR Driver for development mentioned on this link: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm303agr_STdC

I am getting issue of interrupt occurs at ODR time instead i require this interrupt should occur on value changed beyond thresold in any direction.

Magnetometer Configuration Registers Settings:

  1. CFG_REG_A_M = 0x90 (LOW_POWER, ODR_10Hz, Enable temperature compensation)
  2. CFG_REG_B_M = 0x02 (SENS_OFF_CANC_EVERY_ODR, CONTINUOUS_MODE)
  3. CFG_REG_C_M = 0x50 (Enable Block Data Update, Enable Interrupt)
  4. INT_CRTL_REG_M = 0xE7 (All bits set to 1)
  5. INT_THS_L_REG_M = 0x64(Threshold LSB)
  6. INT_THS_H_REG_M = 0x00(Threshold MSB).

I have attached LSM303 initialize function.please check it.

Can you please provide Accelerometer interrupt generation Register configurations for value changed to Threshold in any direction.

Thanks,

-Ankit

    This topic has been closed for replies.