2020-11-30 05:04 AM
Hi,
In the LPS33WTR pressure sensor,
I want to program the LPS33WTR FIFO to a certain pressure and configure the interrupt as Threshold-based interrupt.
No Where have I found the duration of the Interrupt logic change.
I want to use it as a HW trigger once a threshold is crossed (pressure decreases).
For how long will the Interrupt stay in 'high' state ( assuming it is configured as Active high AND Push - Pull).
Thanks!
Solved! Go to Solution.
2020-11-30 08:44 AM
Hi @SGano.1 ,
please note that the threshold that can be set for the FIFO is not related to a "pressure" threshold, i.e. a physical, but is referred to the number of samples stored in the FIFO memory. As reported in the datasheet p.18: "a FIFO threshold interrupt can be enabled (F_OVR bit in CTRL_REG3 (12h) in order to be raised when the FIFO is filled to the level specified by the WTM4:0 bits of FIFO_CTRL (14h)".
You can however of course set a threshold for a certain pressure in the THS_P_H (0Dh) and THS_P_L (0Ch). In this case, to generate an interrupt event based on a user-defined threshold, the DIFF_EN bit must be set to '1' and the threshold values stored the previous registers. When DIFF_EN = '1', the PHE bit or PLE bit (or both bits) has to be enabled. The PHE and PLE bits enable the interrupt generation on the positive or negative event respectively.
>> For how long will the Interrupt stay in 'high' state
If the interrupt is not latched, it will stay 1/ODR seconds, while if latched (LIR bit of the INTERRUPT_CFG (0Bh) register) it will stay high till the event has occurred.
You can however find more details in the datasheet, p.35 and 36.
-Eleon
2020-11-30 08:44 AM
Hi @SGano.1 ,
please note that the threshold that can be set for the FIFO is not related to a "pressure" threshold, i.e. a physical, but is referred to the number of samples stored in the FIFO memory. As reported in the datasheet p.18: "a FIFO threshold interrupt can be enabled (F_OVR bit in CTRL_REG3 (12h) in order to be raised when the FIFO is filled to the level specified by the WTM4:0 bits of FIFO_CTRL (14h)".
You can however of course set a threshold for a certain pressure in the THS_P_H (0Dh) and THS_P_L (0Ch). In this case, to generate an interrupt event based on a user-defined threshold, the DIFF_EN bit must be set to '1' and the threshold values stored the previous registers. When DIFF_EN = '1', the PHE bit or PLE bit (or both bits) has to be enabled. The PHE and PLE bits enable the interrupt generation on the positive or negative event respectively.
>> For how long will the Interrupt stay in 'high' state
If the interrupt is not latched, it will stay 1/ODR seconds, while if latched (LIR bit of the INTERRUPT_CFG (0Bh) register) it will stay high till the event has occurred.
You can however find more details in the datasheet, p.35 and 36.
-Eleon
2020-12-01 05:38 AM
Thanks Eleon!
>> it will stay high till the event has occurred.
Do you mean after the Event had ended and the pressure has returned to above the threshold?
2020-12-01 08:32 AM
Hi @SGano.1 ,
right, the interrupt should stay high until the pressure goes back down (or up) of the threshold.
-Eleon
2020-12-04 10:38 PM
Hello Eleon,
I have two more questions.
Thanks!