当触发相同优先级的三个中断(Cortex-M)时,一个人会错过吗?
假设中断XN需要5秒(夸张),那么我在第一个秒触发第一个X1中断,第二秒中的第二个X2中断,而第三个X3中断第三秒,实际上会发生什么?中断会丢失吗?
Assuming that an interrupt XN takes 5 seconds (exaggeratedly), then I trigger the first X1 interrupt in the 1st second, the second X2 interrupt in the second, and the third X3 interrupt in the third, in fact What will happen? Will the interrupt be lost?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这些是三个不同的中断数字,那么只要要维修第一个的数字,它们都可以保持待处理。如果他们是较高的优先级,那么他们甚至可以在第5秒钟进行抢先第一个。
如果相同的边缘敏感中断发生在第一个处理前三次,那么是的,您是正确的,中断处理程序只能运行两次,而第三次出现会丢失。
如果同一敏感的中断发生在第一个处理前三次,则取决于处理程序函数期间您清除相应的标志。处理程序很有可能仅运行一次,第二和第三次发生都会丢失。
If these are three different interrupt numbers then they can all stay pending for as long as it takes for the first one to be serviced, and will run after it. If they are higher priority then they could even pre-empt the first one and be serviced part way through the 5 seconds.
If the same edge-sensitive interrupt occurs three times before the first is handled, then yes you are correct that the interrupt handler will only run twice and the third occurrence is lost.
If the same level-sensitive interrupt occurs three times before the first is handled, then it depends when during the handler function you clear the respective flag. It is quite possible that the handler only runs once and both the second and third occurrences are lost.