首页 > 其他 > 详细

cpu中断机制

时间:2019-01-27 15:53:52      阅读:174      评论:0      收藏:0      [点我收藏+]

When an interrupt gets active, the microcontroller goes through the following steps ?

  • The microcontroller closes the currently executing instruction and saves the address of the next instruction (PC) on the stack.

  • It also saves the current status of all the interrupts internally (i.e., not on the stack).

  • It jumps to the memory location of the interrupt vector table that holds the address of the interrupts service routine.

  • The microcontroller gets the address of the ISR from the interrupt vector table and jumps to it. It starts to execute the interrupt service subroutine, which is RETI (return from interrupt).

  • Upon executing the RETI instruction, the microcontroller returns to the location where it was interrupted. First, it gets the program counter (PC) address from the stack by popping the top bytes of the stack into the PC. Then, it start to execute from that address.

cpu中断机制

原文:https://www.cnblogs.com/lnas01/p/10326409.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!