ST意法半导体
直播中

李星童

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

有没有办法用LIS2MDL检测溢出?

问候
我正在使用LIS2MDL为教育市场构建磁场传感器。当测量的磁场超过最大允许值时,我注意到LIS2MDL返回不可预测的数据而不是0x7fff(32767)或0x8000(-32768)。
有没有办法可以检测磁场测量溢出,以便我们的可视化软件可以让用户知道测量数据无效?
谢谢
Scott Wild

以上来自于谷歌翻译


以下为原文




Greetings
I am using the LIS2MDL to build a magnetic field sensor for the education market.  When the magnetic field being measured exceeds the maximum allowed value, I notice that the LIS2MDL returns unpredictable data rather than 0x7fff (32767) or 0x8000 (-32768).
Is there a way I can detect a magnetic field measurement overflow so that our visualization software can let the user know the measurement data is invalid?
Thank you
Scott Wild

回帖(2)

张媛媛

2018-9-25 17:27:30
嗨,
您可以检查INT_SOURCE_REG中的MROI位。如果发生测量范围溢出,该标志会发出警报。确保中断发生器有效(IEN位= 1)。通过读取INT_SOURCE_REG复位锁存的MROI位。
问候
马切伊

以上来自于谷歌翻译


以下为原文




Hi,
You can check the MROI bit in INT_SOURCE_REG. This flag alerts if a measurement range overflow has occured. Make sure that the interrupt generator is active (IEN bit = 1). Latched MROI bit is reset by reading INT_SOURCE_REG.
Greetings
Maciej
举报

吴娜

2018-9-25 17:46:48
嗨,我对LIS2MDL和LIS3MDL都有相同的行为。
我的应用是检测磁铁的接近程度。在大约1厘米的范围内,措施出乎意料。
我已经用其他一些传感器进行了一些实验,但只有一个轴,行为与预期的一样:磁铁越近,测量值越高,直到饱和度保持饱和状态......
我已经尝试过Maciej的命题,但这个过程来得太晚了,措施已经错了。
斯科特你是否设法得到正确的操作?
谢谢
彼得

以上来自于谷歌翻译


以下为原文

Hi, I have the same behaviour with LIS2MDL and also with a LIS3MDL.
My application is to detect the proximity of a magnet. Under about 1cm the measures are unexpected.
I have done some experiments with some other sensors but with only one axe and the behaviour is as expected : the closer the magnet, the higher the measurement until saturation, which stays saturation...
I have tried the Maciej's proposition but this process comes too late, the measures are already false.
Scott did you manage to get a correct operation ?
Thanks
Peter
举报

更多回帖

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