LSM303AGR INT pin not firing
Hi,
I am using nordic MCU to operate LSM303AGR magnetometer device.
My goal is to get a Z-axis interrupt upon crossing the pre-calibrated threshold.
The i2c write and reads are working fine.
INT bit of register 64h (INT_SOURCE_REG_M) is responding when getting a magnet nearby (when polling this register), yet the interrupt pin stays low all the time (verified with a logic analyzer).
MCU pin is configured as input without pullup.
The following register writes are being performed by the firmware:
1. Write 00h in CFG_REG_A_M // Turn on the magnetometer // ODR = 10 Hz
2. Write 40h in CFG_REG_C_M // Interrupt driven on INT_MAG/DRDY pin
3. Write 80h in INT_THS_L_REG_M // Set a threshold equal to 128 (expressed in LSB)
Write 00h in INT_THS_H_REG_M
4. Write E7h in INT_CTRL_REG_M // Enable a latched active-high interrupt on the three axes
We tried to set the INT_CTRL_REG_M to 0x25 and the CFG_REG_C_M to 0x41 and still no change in the pin reading.
Can you please help me understand what am i doing wrong?
Regards,
Gil
