完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我想使用PiSP0.1和P0.4(焊盘5和9)作为中断,这两个中断都通过CyBLY-01400—00上的下降沿触发。我在这两个电路中分别使用了两个引脚来触发中断,但在程序中同时使用它们也遇到困难。
我是读864 39节6.8,但是它看起来只有在相邻的物理引脚上相邻的引脚是可能的。我试着在配置选项中单击这个设置,但是它说对于中断的引脚是不允许的。 有没有办法使用这两个引脚来触发中断?我也试着放置两个独立的引脚组件。如果有两个引脚和两个中断,它将不会让我分配正确的引脚,因为在端口上已经有一个中断。如果两个针脚都连接到相同的中断,它说在信号上有多个驱动器。 回过头来看,使用其他引脚更容易,但这已不再是一种选择。我不必确定中断发生的两个引脚中的哪一个(尽管这将是一个额外的奖励)。 我很感激任何输入!谢谢 以上来自于百度翻译 以下为原文 I would like to use the Pins P0.1 and P0.4 (pads 5 and 9) as interrupts both triggered via falling edge on a CYBLE-014008-00. I've used both pins individually to trigger interrupts without problem in my circuit, but am experiencing difficulty using them at the same time in a program. I was reading AN86439 section 6.8, but it looks like that example is only possible if the pins are contiguous on adjacent physical pins. I tried clicking off this setting in the configuration option, but it says that is not allowed for pins with interrupts. Is there a way to use those two pins to trigger an interrupt? I've also tried to place two separate pin components. If there are two pins and two interrupts, it won't let me assign the correct pins due to there already being an interrupt on the port. If both pin components are connected to the same interrupt it says there are multiple drivers on the signal. In retrospect, it would have been easier to use other pins, but that's no longer an option. I do not necessarily need to determine which of the two pins the interrupt occurs (although this would be a bonus). I'd appreciate any input! Thanks |
|
相关推荐
12个回答
|
|
您可以使用两个连接到引脚的ISR组件,而不是使用PIN内部中断。必要时可调整优先级。
不要使用冗长的代码来编写UART等,使用延迟函数或更长的循环。最好的做法是在需要时清除中断原因(在我的例子中不是),设置一个全局变量,这些变量在主循环中检查并作用。 鲍勃 以上来自于百度翻译 以下为原文 You may use two Isr components connected to the pins, not using the pin-internal interrupt. The priorities can be adjusted when necessary. Do not use lengthy code as writing to UART etc, using delay functions or longer loops. Best practice is to clear the interrupt cause when needed (in my example it is not), set a global volatile variable that is checked in the main loop and acted upon. Bob |
|
|
|
谢谢你的回应,我很感激。由于ISR组件直接连接到引脚,是否有可能在下降沿上触发中断而不是上升沿?使用PIN内部中断提供了一个选项,但我不认为它是ISR组件之一。
以上来自于百度翻译 以下为原文 Thanks for the response, I appreciate it. With the ISR components tied directly to the pins, is it possible to trigger the interrupts on the falling edge instead of a rising edge? Using the pin-internal interrupts provides that as an option, but I do not see it as one with the ISR components. |
|
|
|
使用“非门”来反转ISR组件的输入。
鲍勃 以上来自于百度翻译 以下为原文 Use a NOT gate to invert the input for the isr component. Bob |
|
|
|
好主意,谢谢。我成功地得到了它使用非门触发,我试图使用中断从Hibernate唤醒(本来应该先提到这个)。当我在CysSpMibernate中添加时,它不再像在我从PIN内部中断切换之前那样运行了。如果是这样的话,为什么这种新的中断方式(与内部PIN中断相反)会干扰休眠模式?对不起,这么多问题,我总是使用内部引脚中断。
以上来自于百度翻译 以下为原文 Great idea, thanks. I successfully got it to trigger using the not gate, but I'm attempting to use the interrupt to wake from hibernate (should have mentioned this initially). When I add back in the CySysPmHibernate, it no longer operates as before I switched from the pin internal interrupt. Are the not gates available in hibernate mode? And if so, is there a reason why this new way of doing the interrupt (as opposed to the internal pin interrupt) would interfere with the hibernate mode? Sorry for so many questions, I've just always used internal pin interrupts. |
|
|
|
可以使用新的中断方式(不再使用内部引脚中断)来唤醒设备免受休眠吗?
如果不是,那么有可能使用低功率比较器吗? 编辑-看起来低功耗比较器是不可用的那些引脚。我也有困难,路由引脚一起,这是我的第二个想法。没有任何理由为什么他们不能连接内部和只使用一个内部引脚中断?请参阅附件 屏幕截图2017~01-11在2.27.50PM.PNG 15 K 以上来自于百度翻译 以下为原文 Can the new way of interrupt (no longer using the internal pin interrupt) be used to wake the device from hibernate? If not, would it be possible to use a low power comparator instead? Edited- it looks like the low power comparator is not available for those pins. I am also having difficulty routing the pins together, which was my second thought. Is there any reason why they would not be able to be connected internally and just use one internal pin interrupt? Please see attached |
|
|
|
在Hibernate(几乎)中,除了PIC(外围中断控制器)之外,没有一个组件在运行。在某些设备上,您需要专用的引脚才能退出休眠。见AN8623。
鲍勃 以上来自于百度翻译 以下为原文 In hibernate (nearly) none of the components are running except the PIC (Peripheral Interrupt Controller). On some devices you need dedicated pins to get out of hibernate. See AN86233. Bob |
|
|
|
为增加阅读的建议,谢谢。我看到,在休眠模式下,有必要使用PIC醒来使用针。
这让我回到我无法使用PIC的符合要求的两个引脚同时初始问题。 我为什么不能有一个内部引脚中断设置为唤醒装置通过PIC,只是路线第二针第一针? 编辑:我尝试连接的引脚在内部,但只有一个内部interrupttriggers中断。不该路由的引脚在一起意味着其他引脚应该吗? 以上来自于百度翻译 以下为原文 Thanks for the suggestion for the additional reading. I see that in hibernate mode, it is necessary to use the PIC to wake up using the pins. This brings me back to my initial question of not being able to use the PIC for the two desired pins at the same time. Is there any reason why I couldn't have one of the internal pin interrupts set to wake up the device via the PIC, and just route the second pin to the first pin? Edit: I've tried connecting the pins internally, but only the one with the internal interrupt triggers the interrupt. Shouldn't routing the pins together mean that the other pin should as well? |
|
|
|
见附件项目:
想象一下当休眠CPU停止时。当端口中断发生时,执行Hibernate调用的语句将被执行。你可以读出两个极性,看看哪一个发射。 当CPU运行时,全局信号引用会给你一个中断。 鲍勃 CY8C01408. Cyrkk.Access 01.ZIP 21.4 K 以上来自于百度翻译 以下为原文 See attached project: Imagine when hibernating the CPU is stopped. When a port interrupt occurs, the statement following the hibernate call will be executed. You may read the two pins polarities to see which one fired. The global signal reference will give you an interrupt when the CPU is running. Bob |
|
|
|
谢谢!这是完美的,我没有考虑使用全球信号参考。我能检查极性,看看哪个插销引起了中断。这个模块的灵活性很大,我仍然掌握它的诀窍。
我衷心感谢您对我的提问的耐心和耐心。如果我们碰巧过马路,我欠你一杯饮料和午餐。 以上来自于百度翻译 以下为原文 Thanks! This works perfectly and I hadn't considered using the global signal reference. I was able to check the polarity to see which pin caused the interrupt. The flexibility of the module is great, and I'm still getting the hang of it. I sincerely appreciate your help and patience with my questions. If we happen to cross paths in the future I owe you a drink and/or lunch. |
|
|
|
这是一个很好的提议!太可惜了,我不经常访问美国。你的位置在哪里?
鲍勃 以上来自于百度翻译 以下为原文 That's a kind offer! Too bad that I do not frequently visit the US. Where are you located? Bob |
|
|
|
在康涅狄格,但是我每个星期都在纽约呆一段时间。你呢?不幸的是,我没有机会经常去国际旅行。
以上来自于百度翻译 以下为原文 In Connecticut, but I spend some time in New York each week. And you? I don't get the chance to travel internationally often, unfortunately. |
|
|
|
我去过圣何塞,波特兰和西雅图。我住在德国附近的不来梅,那里是欧洲航天局和空中客车。远,远…
鲍勃 以上来自于百度翻译 以下为原文 I've been to San José, Portland and Seattle. I live in Germany near Bremen where the ESA and Airbus are. Far, far away... Bob |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2070 浏览 1 评论
1826 浏览 1 评论
3639 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1761 浏览 6 评论
1513 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
511浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
361浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
858浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 00:12 , Processed in 1.163733 second(s), Total 101, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号