I am using a MPl3115A2 pressure sensor for measuring the pressure with a threshold limit and a threshold window and I set the values for the the registers as follows:
write to CTRL_REG1 (0x26) : 0x02 (Settnig the OST bit)
write to CTRL_REG2 (0x27) : 0x05 (set the ST bits to 32 secs per sample of pressure data)
write to PT_DATA_CFG(0x13):0x07(set data ready flags)
write to CTRL_REG3(0x28): 0x11 (interrupts to active low open drain)
write to CTRL_REG4(0x29): 0xA8 (To enable the interrutps for data and the threshold)
write to CTRL_REG1 (0x26): 0x39(To set it in Active mode)
write to P_TGT_MSB and P_TGT_LSB threshold values for the pressure
write to P_WND_MSB and P_WND_LSB window values
write to CTRL_REG5 (0x2a) : 0x00 (To set the interrupt pin to INT2)
I later check the Interrupt source register to the hex value 0xA0 and read the pressure data.
I get a zero when I check the interrupt source register value. Is this configuration correct for setting the pressure threshold interrupt? Am I doing anything wrong? Please correct me if I am wrong.
Any extra explanation on interrupt setting for threshold value detection would also be helpful.
Thanks in advance.