2019-09-04 01:01 PM
Hi guys,
I have a question of how configuring 1kHz interrupts on the MEMS Sensor H3LIS331DL.
My configuration is as seen below.
writeByte(STM_ACC_address, STM_CTRL_REG_1, 0x3F, hi2c);
writeByte(STM_ACC_address, STM_CTRL_REG_4, 0x10, hi2c);
writeByte(STM_ACC_address, STM_CTRL_REG_3, 0x14, hi2c);
writeByte(STM_ACC_address, STM_INT1_DURATION, 0x00, hi2c);
I'll get the interrupts on a maximum frequency of 330kHz. With ODR 1000 shouldn't I get them with 1kHz?
In addition I have problems with the raw data converting to g, how can I do this?
Thanks in advance.
Best Matthias
2019-09-06 05:39 AM
Hi,
I suppose you need the DRDY signal on INT2 pin. So the value for CTRL_REG3 should be 0x10, if you want DRDY on INT1 then the value should be 0x02.
The INT1_DURATION doesn't have any meaning for DRDY signal.
Please be sure you read the data fast enough. The DRDY interrupt signal is reset only if you read the data. So I think you read the data with frequency 330Hz.
I would also recommend to set the BDU bit in CTRL_REG_4 to have constistency in output data low and high byte.
2019-09-08 04:00 AM
naam
2019-09-16 04:21 AM
naam