完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
当引脚的数量被设置时,引脚组件如何中断生成功能?设置1和多个引脚以产生中断?
以上来自于百度翻译 以下为原文 How does the pins component interrupt generation function when the number of pins is set > 1 and mulptiple pins are set to generate interrupts? |
|
相关推荐
9个回答
|
|
可以使用中断组件(Systems Tab),并将一个连接到每个需要中断的PIN。
然后,可以使用中断API和设计范围资源选项卡来更改中断优先级等。 以上来自于百度翻译 以下为原文 You can use the interrupt component (Systems Tab), and connect one to each pin requiring an interrupt. Then you can use the interrupt API, and the Design Wide Resources tab, to change interrupt priorities etc. |
|
|
|
我真的试图找出硬件方面如何处理多个中断源,如果不止一个同时活跃的话?API解决了这些问题吗?如果正在中断服务,但尚未在PIN上释放请求,并且激活另一个请求,新请求是否被识别?有什么详细的描述吗?
以上来自于百度翻译 以下为原文 I was really trying to find out how does the hardware side deal with multiple sources of interrupts if more than one were active at the same time? Does the API resolve this some how? If an interrupt is being serviced, but has not yet released the request at the pin and another request is activated, is the newer request recognized? Is there a detailed description of this somewhere? |
|
|
|
中断是由中断控制器在硬件中处理的。它可以处理32个中断,并允许用户分配八级中断优先级,0到7。优先级0是最高的,7是最低的。优先级可以在设计时设置,并且在运行时动态地改变/设置。如果同时发生两个中断,则首先服务优先级最高(最低数)的中断。如果中断服务并且发生较高优先级中断,则当前中断服务。暂停,较高优先级的中断得到服务,当完成时,较低级别的中断将恢复。
有关中断硬件的更多细节,请参见这里的TRM第8章(中断控制器)。DOCID=18266 以上来自于百度翻译 以下为原文 Interrupts are handled in hardware by the Interrupt Controller. It can handle 32 interrupts and allows the user to assign eight levels of interrupt priority, 0 to 7. Priority 0 is the highest and 7 the lowest. Priorities can be set at design time and changed/set dynamically at runtime. If two interrupts occur at the same time the interrupt with the highest priority (lowest number) is serviced first. If an interrupt is being serviced and a higher priority interrupt occurs, then the current interrupt service is suspended and the higher priority interrupt gets serviced, and when done the lower level one will resume. For more detail of the interrupt hardware, see chapter 8 (Interrupt Controller) of the TRM here http://www.cypress.com/?docID=18266 www.cypress.com/ |
|
|
|
我不应该恰当地措辞这个问题…
如果我将一个引脚组件放置在一个示意图上,并将引脚数设置为大于1的值,并设置每个引脚以产生中断,则只有一个中断连接到中断控制器。硬件/ API如何处理连接到这个中断源的多个源?如何知道哪个引脚产生了中断?当一条线路中断产生并正在被服务时,会发生什么,另一条线路连接到同一个引脚组件会引起中断?会发生吗?创建者不会允许同一组端口引脚的多个引脚组件有单独的中断。所以我的问题是,端口/引脚组件如何处理多个引脚连接到单个引脚组件,可以产生中断?我透过文件无法找到这个话题处理…我理解的优先级和中断控制器,但这之前发生在硬件这一点。 谢谢。 以上来自于百度翻译 以下为原文 I must not be wording the question properly... If I place a pins component on a schematic sheet and set the number of pins to a value greater than 1 and set each pin to generate interrupts, I only have a single interrupt which connects to the interrupt controller. How does the hardware/API deal with multiple sources connected to this single interrupt source? How do I know which pin generated the interrupt? What happens when the interrupt for one of the lines is generated and is being serviced and another line connected to the same pins component should cause an interrupt? Will it happen? Creator will not permit multiple pins components for the same group of port pins to have individual interrupts. So my question is...How does the port/pins component deal with multiple pins attached to a single pins component that can generate interrupts? I looked through the documentation and cannot find this topic dealt with...I understand the priorities and the interrupt controller, but this occurs before that point in the hardware. Thanks. |
|
|
|
你好,蓝精灵,
我想你可能错过了一步。这就是如何做到这一点。 放置引脚组件,并配置所需引脚数。然后,正如您以前所做的,配置引脚组件,用于每个引脚上的中断。现在,放置中断组件,就像你有PIN一样多次,并把一个线连接到每个引脚。 现在您可以在DWR的中断选项卡上配置中断优先级。希望这对你有用。 以上来自于百度翻译 以下为原文 Hi smurask, I think you may be missing a step. This is how to do it. Place the pins component, and configure for the number of pins required. Then, as you have done before, configure the pins component, for the interrupts on each pin. Now, place the Interrupt component, as many times as you have pins, and wire one to each pin. Now you can configure the interrupt priorities on the Interrupts Tab of DWR. Hope this works for you. |
|
|
|
好吧…我猜我以为引脚组件能够复用的中断请求在某种程度上,是从中断引脚组件输出的目的????我想这只不过是一个单一的引脚中断应用。谢谢。
以上来自于百度翻译 以下为原文 OK...I guess I thought that the pins component was able to multiplex the interrupt requests somehow and that was the purpose of the interrupt output from the pins component??? I guess that is only for a single pin interrupt application. Thanks. |
|
|
|
c1441424 发表于 2019-3-8 14:43 我试着用这种方法来实现一些东西,但对我来说不行。 以上来自于百度翻译 以下为原文 I tried implementing something in this way and it wouldn't work for me. |
|
|
|
只有一个中断线用于端口。你需要阅读所有的引脚的处理程序来确定哪些引脚(S)引起的中断。 鲍勃 以上来自于百度翻译 以下为原文 There is only one interrupt line used for a port. You will need to read all pins in the handler to determine which pin(s) were causing the interrupt. Bob |
|
|
|
穆拉斯基
端口内的中断源是在一起的。即当您在端口内实例化多个分组引脚并启用中断时,您将获得组中所有引脚的单个ISR。当ISR发生火灾时,你必须找出哪个引脚造成了中断。要做到这一点,在ISR例程中使用API PunNeMayExchange中断(),它返回所有中断事件源(同时也清除中断源):位0—Pin 0、BIT1-Pin 1等。 定义Mask2 0x4//PIN:2 CysISR(MyPin) { UTI8InStase=‘$StasyNoNo.`CySc除除器();//必须清除 如果((Indos&Mask2)=1) { /你的代码… } } 以上来自于百度翻译 以下为原文 steve.murasky, interrupts sources within the port are OR-ed together. That is when you instantiate several grouped pins within the port and enable the interrupt, you will get a single ISR for all pins in the group. When ISR fires you have to find which of the pins caused the interrupt. To do that, inside ISR routine use API PinName_ClearInterrupt(), which returns all sources for interrupt event (while also clearing interrupt source): bit 0 - pin0, bit1 - pin1, etc. #define MASK2 0x4 // pin: 2 CY_ISR(myPinInt) { uint8 intSource = `$INSTANCE_NAME`_ClearInterrupt(); // must clear if ((intSource & MASK2)==1) { //your code .... } } |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2081 浏览 1 评论
1833 浏览 1 评论
3648 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1773 浏览 6 评论
1520 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
526浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
380浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
418浏览 2评论
364浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
874浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-2 10:36 , Processed in 1.100218 second(s), Total 94, Slave 78 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号