ST意法半导体
直播中

王俊

7年用户 177经验值
私信 关注
[问答]

LIS2DH是否可以使用自测功能触发中断?

嗨,
我想测试中断1和2是否在LIS2DH上正常工作。
是否可以使用自测功能触发中断?
感谢您的帮助

#lis2dh #self-test #interrput

以上来自于谷歌翻译


以下为原文




Hi,
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

#lis2dh #self-test #interrput

回帖(2)

曾玲娟

2018-10-29 16:26:04
没有用于测试中断的内置函数。
但是,例如,您可以将阈值中断设置为某个非常高的值,并将条件设置为在测量的加速度低于阈值时启用中断,这样就可以人为地触发中断,而无需使用传感器进行移动。

以上来自于谷歌翻译


以下为原文




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.
举报

孙灿

2018-10-29 16:44:50
实际上你可以用内置的自测试来自我测试中断。
如果您阅读规格表,请参阅第7.6至7.9节
在CRTL_REG3中你需要设置I1_AOI1和
I1_AOI2位为1以激活中断,默认情况下它们为0。
在自检模式下天气或使用外部振动进行测试,这些将根据预设的阈值水平激活中断。
如果使用振动测试,您只需确定要使用的级别,在自测模式下,中断应该触发。
最简单的一个当然是将LIS2DH int引脚连接到微型中断,以查看它们是否被触发。

以上来自于谷歌翻译


以下为原文




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.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分