2018-02-13 03:54 AM
Hi All,
I am trying to understand configuration of H3LIS331DL sensor with Data Ready Interrupt.
As per my previous posts, I understood Turn On-Time should be given after Configuring the Control Register 1.
Here is the sequence I am using to get Data Ready Interrupt.
Step1: Give power to Accel Sensor
Step2: Setting Ctrl_Reg1 with 00111111b(0x3F)
Step3: As I am configuring ODR as 1000Hz providing sleep of (1/1000+1ms) 2 ms as per data sheet.
Step4: Configuring Ctr_Reg3 with 00000010b (0x02).
Step 5: Enabling H3LIS Interrupt 1 and Interrupt 2 pins and Registering call back API.
Step 6: Waiting for data ready interrupt.
Here I am facing problem is I could not see the Data Ready Interrupt, i.e., Data Ready Interrupt call back function is not triggering.
Anybody faced this problem ?
Thanks,
Siva.
#h3lis331 #h3lis331dl-configuration #h3lis331dl-data-ready-interrupt2018-02-13 05:55 AM
Your sensor configuration is correct, I suppose the problem is in the MCU configuration.
If you have a scope or logic analyzer you can check that the DRDY signal is available on the INT1 pin.
2018-02-13 08:49 AM
Thanks for your input Miroslav.
Here one question will be from above steps in which step suggestible to configure INT1_H3LIS and INT2_H3LIS pins of Accel sensor to enable interrupt from MCU.
2018-02-14 06:31 AM
You can configure it anytime you want, there is not issue with that.
Personally I would configure the interrupts before I set the ODR (before step 2).