I am looking to test if the interrupt 1 and 2 are working correctly on a LIS2DH.
Is it possible to trigger interrupts with the self test functon ?
Thank you for the help
There is no built-in function to test interrupts.
But you can for example setup threshold interrupt to some very high value and set the condition to enable interrupt if measured acceleration is below the threshold, so this will artificaly trigger the interrupt without need to do a movement with the sensor.
actually you can self test the interrupts with the built in self test.
If you read the spec sheet look at sections 7.6 thru 7.9
in CRTL_REG3 you need to set the I1_AOI1 and I1_AOI2 bits to 1 to activate the interrupts, by default they are 0.
Weather in self test mode or using external vibration to test, these will activate the interrupts based on the preset threshold levels.
You simply have to determine what levels you want to use if using vibration to test, in self test mode the interrupts should fire.
One of the easiest is of course attach the LIS2DH int pins to interrupts on the micro to see if they fired.
Retrieving data ...