ST意法半导体
直播中

张锐

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

LIS3DH阈值问题

大家好
我在设置LIS3DH模块以检测移动时遇到问题。
更确切地说,我希望设备在经历32毫秒加速度变化0.5秒时将INT1引脚设置为向下。
这是我的设置:
CTRL_REG1 = 0x20 // 10Hz,正常功耗模式,ZXY使能
CTRL_REG2 = 0x00 //没有HP过滤器
CTRL_REG3 = 0x40 // IA1启用
CTRL_REG4 = 0x10 //缩放4g
CTRL_REG5 = 0x08 //中断1引脚锁存
INT1_THS = 0x01 // 32mg阈值
INT1_DURAtiON = 0x05 // 0.5s激活中断
INT1_CFG = 0x7F //启用6D方向模式,启用所有方向
现在,当我读取INT1_SRC寄存器时,它总是显示0x00,INT1引脚永远不会发生故障......
有趣的是,当我设置
INT1_THS至少为0x0A它可以工作,但对我来说太过分了!
soemone可以帮我解决这个案子吗?

以上来自于谷歌翻译


以下为原文




Hello all
I have a problem with setting LIS3DH module to detect movement.
To be more precise, I want the device to set the INT1 pin down when the it experiences 32mg acceleration change for 0.5 second.
Here are my settings:
CTRL_REG1 = 0x20 //10Hz, normal power mode, ZXY enable
CTRL_REG2 = 0x00 //no HP filters
CTRL_REG3 = 0x40 //IA1 enable
CTRL_REG4 = 0x10 //scale 4g
CTRL_REG5 = 0x08 //interrupt 1 pin latched
INT1_THS = 0x01 //32mg threshold
INT1_DURATION = 0x05 // 0.5s to activate interrupt
INT1_CFG = 0x7F  //6D direction mode enabled, all directions enabled
Now, when I read  INT1_SRC register it always shows 0x00 and INT1 pin never goes down...
Funny thing is that when I set
INT1_THS to at least 0x0A it works but it is too much for me!

Could soemone help me with this case?

回帖(1)

曹皓轩

2019-4-17 09:58:30
嗨,Miroslav,我的要求是检测IIS2DH传感器门打开/关闭的运动,我已经尝试过以上配置,但是当我被中断并读取x,y和z轴值并且它为零时。那么,这有什么问题,请你帮我检测一下开门/关门。谢谢你的时间。

以上来自于谷歌翻译


以下为原文





Hi, Miroslav, My requirement is to detect movement of the door open/close for IIS2DH sensor and I have tried with above configuration but when I have getting interrupted and read x,y and z axis values and it is zero. So, what is wrong with this and could you please help me to detect door open/close. Thanks for your time.
举报

更多回帖

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