2019-09-13 06:05 AM
Hi I´m working with LI2DTW12 acelerometer chip. I trying to configure the sensor to generate an interruption in the INT_1 when the device detect an aceleration in the Z axis.
I have configure the device registers in the following way:
uint8 array_registers_LIS2DTW12[]={0x20,0x25,0x23,0x34,0x35,0x3F};
uint8 config_registers_LIS2DTW12[]={0x20,0xD0,0x20,0x04,0x60,0x22};
But when the LIS2DTW12 generate the interruption on the INT_1 and I read the SATATUS register I saw 0x01. That mean that I have a data ready. And when I reas the WAKE_UP_STATUS register all the bits are 0.
Could anybody help me with this matter?
I not sure I have configured the registers in the correct way or how to read the interruption pin properly.
Thank you for your time and help.
2019-09-13 08:07 AM
Hi @JManu.1 Fernandez Leon , there is no app note yet available for LIS2DTW12, but you can refer to LIS2DW12 which has basically the same regmap as the LIS2DTW12. If you are implementing the wake-up feature, I suggest you the AN5038 p.20, where the configuration procedure is defined.
You can check if you are missing some configuration bits. Regards
2019-09-16 06:51 AM
Hi Eleon,
Thank you for your anwer, it is very usefull.
Only one question more, can I configure this kind of interrup in low power mode?
Best Regards!
2019-09-16 07:47 AM
If you mean that you can wake-up your device from "cold" to "low power" mode (instead of "high performance"), yes you can do it. You can just set the proper bits in CTRL1 register. Regards
2019-09-17 06:51 AM
I really apreciate you help in this matter, but I´m unable to configure the acelerometer in low-power mode and wake it up only with an aceleration in the Z axis.
Could you help me with this specific configuration of the LIS2DW12?
Thank you for your time and help.
Best Regards!
2019-09-17 07:24 AM
I mean you could use the procedure below, changing the CTRL1 value from 64h (HP mode) to e.g. 60h (LP mode). Regards
2019-10-01 09:16 AM
Hi Eleon,
Thank you for your great help in this matter, it was really useful.
Now I have another question regarding this device.
I want to configure the acelerometer to read XYZ axis on deman mode. I have configure the device in te following way:
write_register(devw, 0x25, 0xD0);
write_register(devw, 0x22, 0x02);
write_register(devw, 0x20, 0x2B);
I want to configure the device in 4g FS.
Before read the XYZ register I check SLP_MODE1:
write_register(devw, 0x22, 0x03);
DM_waitMs(3);
do{
registro3 = read_8bits_register(ISQC_LIS2DTW12_acelerometer_ADR, 0x22);
}
while((registro3&0x01) == 0x01);
This is what I read from the registers XYZ:
X-> 40
Y-> 508
Z-> -2752
My boar is face down over my desk, how can I transform this values into mg? I have configured the registers in the correct way?
Thank you for your help and your time.
Best Regards.
2019-10-07 08:10 AM
Hi @JManu.1 Fernandez Leon , converting the decimal data you are showing (X, Y, Z = 40, 508, -2752) using the ds sensitivity for FS 2g or 4g, I cannot obtain a sensitive value for the g acceleration (you should get higher value along z and lower along X and Y)... I see you are using the Single data conversion on demand mode... could you try to set the BDU bit in reg 21h and check if the data output is changing? Regards