完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我尝试以单次拍摄模式获取压力数据。 我读了状态 Reg我是谁(0Fh)= B1h Ctrl_Reg1(10h)= 00h, Ctrl_Reg2(11h)= 10h, 然后我写给Ctrl_Reg2&lt; 11h,提供One Shot模式, 现在连续读取此Ctrl_Reg2(11h)= 11h(转换后没有复位位OneShot) 读取状态(27h)= 00h 压力数据(注册2Ah:29h:28h)= 2F6666h 我只能将默认值写入Ctrl_Reg2&lt; 10H 现在读取Ctrl_Reg2 = 10h,但状态和压力数据没有变化。 该文件 “AN4672 应用说明 LPS22HB / LPS25HB数字压力传感器:系统集成的硬件指南', 第19,20页,使用Config Reg(43h)中的一些CTE位提出单触发模式的特殊程序,但该寄存器在LPS22HB数据表中没有描述,并且不清楚,CTE位的数量是多少。阅读此Reg 43h = 20h的结果 #lps22hb 以上来自于谷歌翻译 以下为原文 Hi, I try to get the pressure data in One shot mode. I read the state of Reg Who am I (0Fh)=B1h Ctrl_Reg1 (10h)=00h, Ctrl_Reg2 (11h) =10h, then I write to Ctrl_Reg2< 11h, to provide One Shot Mode, Now continuous reading of this Ctrl_Reg2(11h) = 11h (no reset bit OneShot after conversion) Reading of Status (27h) =00h Pressure Data (Regs 2Ah:29h:28h) = 2F6666h I may only write default value to Ctrl_Reg2 < 10h Now reading of Ctrl_Reg2=10h, but no changes in Status and Pressure data. The document 'AN4672 Application note LPS22HB/LPS25HB digital pressure sensors: hardware guidelines for system integration', pages 19,20, proposes special procedure for one shot mode, using some CTE bit in Config Reg (43h), but this register is not described in LPS22HB datasheet and it is not clear, what is the number of CTE bit. The result of reading this Reg 43h = 20h #lps22hb |
|
相关推荐
3个回答
|
|
嗨,
我还不清楚你是否已经应用了单次触发模式的程序,在Config Reg(43h)中设置了CTE位,如应用笔记AN4672所述。 如果没有,请尝试执行以下步骤: 在寄存器43h中写入0x20h 2-写CTRL_REG2(设置一个镜头位以开始新的转换) 3-轮询STATUS_REG(27h)中的状态位,当数据准备就绪时,读取压力输出寄存器。 4-(可选)读取CTRL_REG2以检查单击位是否已复位(自清除)。 问候 安东内拉 以上来自于谷歌翻译 以下为原文 Hi, I have not clear if you have applied the procedure for one shot mode, set CTE bit in Config Reg (43h), described in application Note AN4672. If not, please try to do the following steps: 1-Write 0x20h in reg 43h 2- Write CTRL_REG2 (set one shot bit to start a new conversion) 3- Polling the status bit in the STATUS_REG (27h) and when tha data is ready, read the pressure output registers. 4- Optionally, read the CTRL_REG2 in order to check that the one shot bit has been reset (it is self clear). Regards Antonella |
|
|
|
嗨,Antonella,
谢谢你的答案。 在PowerOn上 reg43h = 20H reg10h = 0 reg11h = 10H reg27h = 02h(准备好温度数据) 如果我读到温度: reg2Bh:2Ch = 0000h, 现在reg27h = 0 我试着 写reg43h = 20h 写reg11h = 11h 然后轮询reg27h - 它等于0 读reg11h = 11h 我也试着 写reg43h = 0 写reg43h = 20h 写reg11h = 11h 然后轮询reg27h - 它等于0 轮询reg11h - 它等于11h 所有这些我都会在几秒钟内发送和读取,使用监视器应用程序,我手动编写regs的nums及其状态。 可能是,reg43h中的CTE位不是第5位(bbCTEb bbbb)? AN4672在reg43h中没有对该位的位置进行校正,我找不到reg43h位的描述。州reg43h = 20h我只能通过阅读reg43h获得。 在数据表中没有提到这个reg。 最好的祝福, 瓦迪姆 附: 我试着写信给reg43h&lt; 1,2,4,8,10h,20h,40h,80h,然后写入reg11h&lt; 11h。反应没有变化。 我还写了移位寄存器RPDS_L:RPDS _H然后读取reg28:29:2A - 它们的状态被转换为输入到RPDS值。 因此,LPS22HB对SPI事务做出反应,但不能完成测量。 以上来自于谷歌翻译 以下为原文 Hi, Antonella, thank You for answer. on PowerOn reg43h=20h reg10h=0 reg11h=10h reg27h=02h (temperature data ready) if I read the temperature: reg2Bh : 2Ch = 0000h, and now reg27h=0 I try to write reg43h=20h write reg11h=11h then polling reg27h - it equals 0 read reg11h=11h I also try to write reg43h=0 write reg43h=20h write reg11h=11h then polling reg27h - it equals 0 polling reg11h - it equals 11h All this I send and read with intervals in a few seconds, using monitor application, where I manually write the regs' nums and their states. May be, CTE bit in reg43h is not the 5th one (bbCTEb bbbb) ? AN4672 doesn't concider the position of this bit in reg43h, and I can't find the reg43h bits' description. The state reg43h=20h I get only by reading reg43h. And in Datasheet this reg isn't mentioned. Best regards, Vadim P.S. I tried to write to reg43h < 1,2,4,8,10h,20h,40h,80h, then write to reg11h<11h. No changes in reaction. Also I wrote to shift regs RPDS_L : RPDS _H then read reg28:29:2A - their states are shifted for entered to RPDS value. So, LPS22HB reacts for SPI transactions, but doesn't accomplish measurement. |
|
|
|
嗨Vadim,
就像你一样,我不懂CTE,因为它没有在LPS22HB数据表中描述。你现在明白了么?你解决了问题吗? 我使用了一次拍摄模式,我不需要设置CTE位但它有效! 以上来自于谷歌翻译 以下为原文 Hi Vadim, just like you, I don't understand the bit CTE because it is not described in LPS22HB datasheet. Do you understand now? Have you solved your problem? I have used one shot mode, and I didn't need to set CTE bit but it worked!! |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2590 浏览 1 评论
3194 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1769 浏览 1 评论
3592 浏览 6 评论
5972 浏览 21 评论
925浏览 4评论
1301浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
567浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1288浏览 3评论
1339浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 17:19 , Processed in 0.970094 second(s), Total 52, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号