|
1 "Is the interrupt scanned regularly?" You can think that the CPU will query the interrupt after executing an instruction. If there is an interrupt signal, the CPU will obtain the corresponding interrupt vector number, and then enter the interrupt handler, provided that your Interrupt enable is turned on;
2 Soft interrupts and hard interrupts are two ways for the CPU to enter interrupts. One is the hardware initiatively initiated, which is manifested in that the peripheral that wants to interrupt actively sends an interrupt signal to the CPU interrupt pin, and the CPU enters the interrupt after sensing the interrupt signal, and The soft interrupt is initiated by the program, and the CPU will also enter the interrupt after executing the soft interrupt instruction in the program. There is one difference: Generally speaking, the hardware interrupt is maskable, while the soft interrupt is non-maskable. |
|