ST意法半导体
直播中

刘文娟

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

LSM303AH -STATUS_A寄存器中的DRDY标志

STATUS_A寄存器中的DRDY标志似乎不起作用。我在ODR = 100Hz,FIFO旁路模式,HR模式下运行acellerometer。每次读取STATUS_A寄存器时,它输出值65,DRDY是最低有效位,并且始终置位。看起来标志永远不会重置。
如果我将磁力计与100赫兹运行的磁力计同步并在磁力计数据之后读取磁力计数据(在磁力计设置DRDY引脚之后),看起来我得到合理的振动数据(每次都是新数据)。
是否有任何技巧可以使DRDY位和STATUS_A寄存器正常工作?在LSM303AGR上,使用fifo时我没有得到高分辨率数据。我想在LSM303AH上有另一个障碍,我可能必须使用fifo或做其他事情,我在数据表/手册中看不到任何相关信息。

以上来自于谷歌翻译


以下为原文




The DRDY flag in the STATUS_A register does not seem to work. I am running the acellerometer at ODR =  100Hz, FIFO bypass mode, HR mode. Every time the STATUS_A register is read it outputs the value 65, the DRDY is the least significant bit and it is always set. It looks like the flag is never reset.
If I syncronize the magnetometer with the acellerometer running both at 100Hz and reading the acellerometer data after the magnetometer data (after DRDY pin set from magnetometer) it looks like I get reasonable acelleration data (new data each time).
Is there any trick to make the DRDY bit and STATUS_A register work as it should? On the LSM303AGR I did not get high resolution data when using the fifo. I guess there is another snag here on the LSM303AH where I probably have to use the fifo or do something else, I cannot see any detalis about this in the data sheet/manual.

回帖(1)

周芳卿

2018-9-10 17:24:32
请确保您比新数据更快地从输出寄存器中读取数据。读取数据后应立即清除DRDY标志。您也可以将DRDY映射到INTx_DRDY中断引脚,并使用示波器或计数器在锁存或脉冲模式下观察它。见第8.6,8.7和8.41节
http://www.st.com/resource/en/datasheet/lsm303ah.pdf


以上来自于谷歌翻译


以下为原文




Please verify that you read the data from output registers fast enough, sooner than new data occur. DRDY flag should be cleared right after reading the data. You can also map the DRDY to INTx_DRDY interrupt pin and watch it using scope or counter in either latched or pulse mode. See sections 8.6, 8.7 and 8.41 in
http://www.st.com/resource/en/datasheet/lsm303ah.pdf
.
举报

更多回帖

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