ST意法半导体
直播中

潘飘稚

8年用户 965经验值
私信 关注
[问答]

在LIS3DH中配置FIFO模式可以将INT2配置为WaterMark中断吗?

嗨,

我试图在FIFO /流模式下配置LIS3DH并且有一些问题,因为数据表不是很清楚。
1)我可以将INT2配置为WaterMark中断吗?我没有看到任何选项将INT2配置为寄存器位中的中断,尽管规范似乎暗示它是可能的。我们的硬件将INT2引脚连接到GPIO,因此想知道将INT2配置为水印中断是一种选择。
2)由于我无法配置INT2,因此我继续轮询FIFO_SRC_REG的WTM位以查看是否已达到水印阈值电平(假设WTM位是要查找的位置)。但是,每当我读取FIFO_SRC_REG时,它就会变为0.我在CTRL_REG5(第6位)中启用了FIFO,并将模式设置在FIFO_CTRL_REG中。我错过了什么?此外,FIFO_SRC_REG对reg位的含义没有任何解释。

以上来自于谷歌翻译


以下为原文




Hi,

   I am trying to configure LIS3DH in FIFO/Stream mode and have a few questions as the data sheet is not very clear.
1) Can I configure the INT2 as the WaterMark interrupt?  I don't see any option to configure INT2 as the interrupt in the register bits, although the spec seems to imply it is possible.  Our hardware has the INT2 pin connected to a GPIO, hence would like to know if configuring INT2 as the watermark interrupt is an option.
2) Since I couldn't configure INT2, I went with polling the WTM bit of FIFO_SRC_REG to see if the watermark threshold level has reached (assuming WTM bit is the place to look for).  However, whenever I read FIFO_SRC_REG it comes out as 0.  I have enabled the FIFO in CTRL_REG5 (bit 6) and set the mode in FIFO_CTRL_REG.  What am I missing? Also, FIFO_SRC_REG doesn't have any explanation on what the reg bits mean.

回帖(1)

潘飘稚

2018-11-27 16:19:34
第2点快速修正。
 
 
但是,每当我读取FIFO_SRC_REG时,它就会显示为0x20(如前所述,不是0)。 FIFO似乎是空的。

以上来自于谷歌翻译


以下为原文





Quick correction on point 2.


However, whenever I read FIFO_SRC_REG it comes out as 0x20 (not 0 as mentioned before).  FIFO seems to be empty.
举报

更多回帖

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