2019-02-19 06:17 PM
In the LSM9DS1, what is the relationship between the interrupt threshold register INT_GEN_CFG_XL (8 bits) and the output register OUT_X_XL (16 bits)?
2019-02-20 02:55 AM
Hi Damon, for e.g. FS +-2g, the INT_GEN_THS_X_XL is unsigned on 8bit on 2g (the sign and the axis of threshold interrupts is configurable in the INT_GEN_CFG_XL register), meaning that the threshold LSB is 2g/2^8 = 3.9mg/LSB.
The OUT_X_XL (16 bits) is signed on 16 bits, meaning an LSB of 4g/2^15 = 0.061mg/LSB.
This means you have a minimum threshold that is higher than the output LSB
2019-02-26 03:45 PM
Thanks for the response.
So you can set interrupts on +(INT_GEN_THS_X_XL) and -(INT_GEN_THS_X_XL) individually?
2019-02-27 11:21 PM
HI Damon, yes, by configuring bits XHIE_XL (for the high threshold, positive direction) and XLIE_XL (for the low threshold, negative direction) in the reg INT_GEN_CFG_XL. Regards
2019-02-28 10:05 PM
OK, I understand. Thank you.
2019-04-17 06:40 PM
Hi Eleon, if the INT_GEN_THS_X_XL register is unsigned 8-bit full scale, then for FS +-2g wouldn't the threshold LSB be 2g/2^8 = 7.8mg/LSB, not 3.9 as you calculated?
The datasheet is not clear about this, but assuming you have +-16g full scale and want to trigger the interrupt when the Z-axis rises above 4g in either direction, e.g. is in the range +4g to +16g or in the range -4g to -16g, then you would set INT_GEN_THS_Z_XL to 64: 16g/2^8 = 62.5mg/LSB; thus 4000 / 62.5 = 64. You would also set INT_GEN_CFG_XL:ZHIE_XL to 1.
My understanding is that the module discards the sign and compares the 15-bit OUT_Z_XL value with the 8-bit threshold (e.g. by shifting left 7 bits). Your calculations seem to indicate that, for e.g. FS +-2g, the maximum possible measurement range is -1g to +1g, thus unsigned 8-bit 1g/2^8 = 3.9mg/LSB. Can you clarify this please?
2019-04-18 01:28 AM
HI Simon, you may be right: the low event detection means rising an interrupt when the data goes below the threshold, not necessarily negative. But let me please check the correctness of this sequences. Regards