完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我已将加速度计插入定制板中。 是通过I2C连接到微控制器,Vdd和Vdd_IO都连接到3V3。 在我的应用中,当所有轴上的加速度大于预定阈值时,微控制器唤醒。 配置工作正常,数据读取也有意义,但INT1引脚保持低电平。 遵循寄存器配置: & sharpdefine IIS2DH_CTRL_REG1_DATA((BYTE)0x47)// ODR = 50Hz,正常模式,X + Y + Z轴全部启用 & sharpdefine IIS2DH_CTRL_REG2_DATA((BYTE)0x00)//禁用过滤器 & sharpdefine IIS2DH_CTRL_REG3_DATA((BYTE)0x40)// I1_AOI1; INT1上的AOI1中断 & sharpdefine IIS2DH_CTRL_REG4_DATA((BYTE)0x30)// FS = +/- 16g,无高分辨率 & sharpdefine IIS2DH_CTRL_REG5_DATA((BYTE)0x08)// INT1_SRC上的锁存中断请求 & sharpdefine IIS2DH_CTRL_REG6_DATA((BYTE)0x00)// INT引脚高电平有效 & sharpdefine IIS2DH_INT1_THS_DATA((BYTE)38)// 52 * 38 = 2000mg阈值 & sharpdefine IIS2DH_INT1_DURAtiON_DATA((BYTE)0x00)// INT1持续时间0 ODR & sharpdefine IIS2DH_INT1_CFG_DATA((BYTE)0x2A)// OR组合,如果X或Y或Z的加速度高于INT1_THR,INT1_DURATION INT1将被触发 如果我连续轮询INT1_SRC,当我施加大于阈值的加速度时,IA,ZH,YH和XH位正确设置为1,但INT1引脚保持低电平,同时完全断开信号与电路其余部分的连接。 如果我将CTRL_REG6配置为使INT1引脚为低电平有效,则它会变高但仍保持高电平。 你可以帮我吗?我错了什么? 先谢谢你。 最好的祝福 安德里亚 #iis2dh-INT1信号代 以上来自于谷歌翻译 以下为原文 Hi, I have inserted the accelerometer in a custom board. Is is connected via I2C to a microcontroller, Vdd and Vdd_IO both connected to 3V3. In my application the micro controller awakes when the acceleration on all the axis is grater than a predetermined threshold. The configuration works fine and also the data read have sense but the INT1 pin remains low. Following the registers configuration: &sharpdefine IIS2DH_CTRL_REG1_DATA ((BYTE)0x47) // ODR = 50Hz, Normal Mode, X + Y + Z axis all enabled &sharpdefine IIS2DH_CTRL_REG2_DATA ((BYTE)0x00) // filter disabled &sharpdefine IIS2DH_CTRL_REG3_DATA ((BYTE)0x40) // I1_AOI1; AOI1 interrupt on INT1 &sharpdefine IIS2DH_CTRL_REG4_DATA ((BYTE)0x30) // FS = +/- 16g, No High Resolution &sharpdefine IIS2DH_CTRL_REG5_DATA ((BYTE)0x08) // Latch Interrupt request on INT1_SRC &sharpdefine IIS2DH_CTRL_REG6_DATA ((BYTE)0x00) // INT pins active high &sharpdefine IIS2DH_INT1_THS_DATA ((BYTE)38) // 52*38= 2000mg threshold &sharpdefine IIS2DH_INT1_DURATION_DATA ((BYTE)0x00) // INT1 duration time 0 ODR &sharpdefine IIS2DH_INT1_CFG_DATA ((BYTE)0x2A) // OR combination if acceleration in X or Y or Z will be higher than INT1_THR for INT1_DURATION INT1 will be triggered If I poll continuously the INT1_SRC, the bit IA, ZH, YH and XH are correctly set to 1 when I apply an acceleration greater than the threshold, but the INT1 pin remains low also completely disconnecting the signal from the rest of the circuit. If I configure the CTRL_REG6 to have the INT1 pin active low, it goes high but it remains high. Can you help me? What I am wrong? Thank you in advance. Best regards Andrea #iis2dh-int1-signal-generation |
|
相关推荐
6个回答
|
|
你好,
有谁可以帮我看看上面的注册设置? 我想在INT1上配置INT1_THS中断。 但 INT1引脚始终保持低电平。 我用示波器验证了INT1信号,并将其与电路的其余部分断开。 寄存器被正确写入,因为软件也为每个寄存器执行读取验证。 非常感谢你。 以上来自于谷歌翻译 以下为原文 Hello, Could anyone please help me to take a look the above register setting? I want to config the INT1_THS interrupt on INT1. But the INT1 pin always stays LOW. I have verified the INT1 signal with an oscilloscope also disconnecting it from the rest of the circuit. The register are correctly written because the software performs also for each register a read verification. Thank you very much. |
|
|
|
Ciao Andrea,
我有基本相同的问题(和类似的应用程序)。我已经使用STEVAL-MKI168V1建立了一个系统,它使用与您的配置几乎相同的配置。 但后来我把IIS2DH放在一个自定义板上。我知道I2C通信的工作原理只是因为我的固件具有通过所有配置过程达到的一些状态,并且它达到了最终配置状态,因此加速度计的每个部分都已正确配置。但在这种情况下,INT1引脚永远不会变高。 我无法从相关的输入引脚断开,但它是一个输入引脚(所以它不应该影响行为),它的配置方式与系统中工作的相同(此外它是相同的引脚)。 您是否尝试过删除锁存选项或更改脉冲持续时间会改变行为? 谢谢,并希望我们中的一个人简要地找到解决方案 马尔科 以上来自于谷歌翻译 以下为原文 Ciao Andrea, I have basically the same problem (and a similar application). I've set up a system using the STEVAL-MKI168V1 and there it works correctly using almost the same configuration as yours. But then I've placed the IIS2DH in a custom board. I know the I2C communication works just because my firmware has some states that are reached through all the configuration process, and it reaches the final configuration state so every part of accelerometer has been configured properly. BUT in this case INT1 pin never goes high. I am not able to disconnect from the related input pin, but it's an input pin (so it should not influence the behaviour) and it's configured in the same way of the one that works in the system (moreover it's the identical pin). Have you tried if removing the latched option or changing the duration of pulse changes the behaviour? Thanks and hope one of us briefly find the solution. Marco |
|
|
|
Ciao Marco,
在我的情况下,INT1使用eva板 STEVAL-MKI168V1带 同样的sw。我想我的电路板上会有一些焊接问题。 我还有另一个问题,在连接在一起的Vdd和Vdd_IO的EVA板上,功耗为70uA @ 2,5V和50Hz,而不是数据手册中声明的11uA。仅当我使用Vdd为eva板供电时,功耗仅为11uA。 所以实际上我修改了用Vdd为芯片供电的电路,并且只有当我必须与芯片通信时才启用Vdd_IO。特别是我已将流启用到FIFO模式。 当我检查它们时,我正在等待新电路我会给你一个更新。 告诉我,如果你想了解更多信息,我会给你直接联系。 安德里亚 以上来自于谷歌翻译 以下为原文 Ciao Marco, also in my case INT1 works using the eva board STEVAL-MKI168V1 with the same sw.What I suppose is that there would be some soldering problem in my board. I have also another problem ,in the EVA board with Vdd and Vdd_IO connected together the power consumption is 70uA @2,5V and 50Hz, not 11uA as declared in the data sheet. The power consumption is 11uA only if I power the eva board with Vdd only. So actually I have modified my circuit powering the chip with Vdd and enabling Vdd_IO only when I have to communicate with the chip. In particular I have enabled the stream to FIFO mode. I'm waiting for the new circuits when I've checked them I'll give you an update. Tell me if you want more info, I'll give you my direct contact. Andrea |
|
|
|
Andrea我心中有一个想法:在过去与ST专家的论坛对话中(我在下面附上)我可能会找到解决方案(对我而言)。
在数据表的第39页写道:'只有在系统启动后才能对该地址进行写操作。'与INT1_CFG寄存器有关。现在,因为它是我在微控制器启动后设置的第一个寄存器,我认为问题可能与我的自定义电路板中的启动时间比测试环境中的启动时间更快有关。我知道这只是因为在我的情况下,我在评估板上写入串口的延迟时间约为2-4秒,自定义端口的串口时间不到半秒。 我认为在引导期间在该寄存器中写入值,如专家所提到的,可能会导致故障,因此引脚不会因为这个原因而变高。 希望这是原因,我希望在明天结束时测试它,然后我可以告诉你更多。 马尔科 以上来自于谷歌翻译 以下为原文 Andrea I have an idea in my mind: in a past forum conversation with an ST expert (that I attach below) I probably find the solution (for me). At page 39 of datasheet there is written: 'A write operation to this address is possible only after system boot.' related to INT1_CFG register. Now, since it's the first register I set after microcontroller boot, I think the issue could be related to the fact that boot time is faster in my custom board than the one in the test environment. I know it just because in my case I have a delay of about 2-4 seconds in writing to serial port in the evaluation board, and less than half second in the custom one. What I think is that writing values in this register during boot, as also mentioned by the expert, could cause a malfuntioning, so the pin doesn't go high for this reason. Hoping this is the cause, I hopefully will test it within tomorrow end, then I can tell you more. Marco |
|
|
|
你好Andrea,
您的传感器配置对我来说似乎没问题,中断应该可行。我猜你的主板上确实存在焊接问题。 关于高电流消耗,我猜你把SA0引脚连接到地,这个引脚有内部上拉电阻,因此额外的电流是由这个上拉电阻引起的。您能否尝试将SA0连接到VDDIO并测量电流消耗? 以上来自于谷歌翻译 以下为原文 Hello Andrea, your sensor configuration seems OK to me, the interrupt should work. I guess there is really a soldering issue on your board. Concerning the high current consumption, I guess you connected SA0 pin to ground and this pin has internal pull-up so the additional current is cause by this pull-up resistor. Could you please try to connect SA0 to VDDIO and measure the current consumption? |
|
|
|
你好Moroslav,
我确认在其他5个板中INT引脚也会改变状态。 关于功耗,可能你是对的,我无法将引脚SA0从地断开,因为连接在芯片下面。 这是一个非常奇怪的情况,我想了解,其他人也有同样的问题! (见Marco Pappalardo的消息)。 最好的祝福 以上来自于谷歌翻译 以下为原文 Hello Moroslav, I confirm that also in other 5 boards the INT pin doest change status. About the power consumption, probably you are right, I'm not able to disconnect the pin SA0 from ground because the connection is under the chip. It is a very strange situation, I'd like to understand, also other guys have the same problem!! (see the message of Marco Pappalardo). Best regards |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2649 浏览 1 评论
3213 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1787 浏览 1 评论
3617 浏览 6 评论
5996 浏览 21 评论
944浏览 4评论
1318浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
589浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1307浏览 3评论
1367浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 19:22 , Processed in 1.230202 second(s), Total 85, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号