cancel
Showing results for 
Search instead for 
Did you mean: 

IIS2DLPC 6D orientation detection not working

msingh08
Associate II

Hi,

I have attempted to follow the AN5201 application note page 26 to configure the IIS2DLPC accelerometer to generate an interrupt at every threshold however this interrupt is never generated. I have tried to print the value of SIXD_SRC register and that is always reporting 0 so I assume that's the reason for not generating an interrupt? Below is the configuration I used, I have also tried to latch the interrupt but even that didn't help so I commented it.

 

If I read the OUTPUT registers I am able to see the correct data and see the thresholds being reached


I would appreciate any help.

Kind Regards
Manpreet Singh


Acc_handler.cntrl_reg.CTRL1_value = 0x64; //ODR = 200 Hz, high-performance
//Acc_handler.cntrl_reg.CTRL3_value = 0x10; //Latched mode -> interrupt is active until SIXD_SRC is not read
Acc_handler.cntrl_reg.CTRL4_value = 0x80; //Route 6D interrupt bit to INT1
Acc_handler.cntrl_reg.CTRL6_value = 0x04; // FS ±2 g, LOW_NOISE enabled
Acc_handler.cntrl_reg.CTRL7_value = 0x20; // Do not use low-pass filter for 6D, enable interrupts
Acc_handler.cntrl_reg.TAP_THS_X_value = 0x40; // Set 6D threshold (6D_THS[1:0] = 10 = 60 degrees)

1 REPLY 1
Federica Bossi
ST Employee

Hi @msingh08 ,

You could have a look at our official examples on github.

Hope this helps 🙂

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.