Interrupts in Embedded Systems
暂无分享,去创建一个
An interrupt is an input to a microprocessor that temporarily redirects the program flow. An interrupt can notify the processor when an analog-to-digital converter (ADC) has new data, when a timer rolls over, when a direct memory access (DMA) transfer is complete, when another processor wants to communicate, or when almost any asynchronous event happens. The interrupt hardware is initialized and programmed by the system software. If the hardware and software engineers do everything right, the code that was interrupted will not even know that an interrupt occurred. The hardware part of this process occurs at hardware speed—microseconds or even tens of nanoseconds for a fast central processing unit (CPU) with a high clock rate. Interrupt input to microprocessors comes in various flavors. Some processors have dedicated interrupt input pins that send the processor to a specific address. Other processors have only one interrupt pin, and the interrupting device must supply an interrupt vector that tells the processor where the interrupt service routine (ISR) is located. Some processors have both kinds of input.