lecNew-23-Interrupt

lecNew-23-Interrupt - WPI ECE2801 Foundations of Embedded...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
WPI ECE2801 Foundations of Embedded Computer Systems Lecture 23: Reset and Interrupt
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 23 Three Ways to Change Program Flow Jumps (BR): one-way trip Procedure CALLs : (Always) Go and RETurn Interrupts: External signals requesting CPU attention Like procedures (labeled subblocks of code that execute and return) Initiated outside of CPU and tend to occur asynchronously Can be accepted and serviced by appropriate Interrupt Service Routine (ISR)
Background image of page 2
EE2801: Foundations of Embedded Systems Lecture 23 Things that Can Cause Interrupt MSP430 can handle up to 16 interrupt sources Each source has a priority relative to the others Three types of interrupts System Reset NonMaskable Interrupts (NMI) Not masked by GIE Higher priorities Maskable interrupts: Can all be disabled by GIE Must be individually enabled in order to be recognized and serviced RESET followed by NMI have the highest priorities Interrupt Vectors Save the 16-bit address of the corresponding interrupt service routine (ISR)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 23 What happens when an interrupt is received? If interrupts are enabled, when an interrupt occurs, the following events happen: 1. The current instruction finished executing. 2. The PC, which holds the address to the next instruction (i.e., return address), is pushed onto the stack. 3. The SR is pushed onto the stack. 4. The interrupt with the highest priority is selected if multiple interrupts occurred during the last instruction and are pending for service. 5.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/12/2009 for the course ECE 2801 taught by Professor Jarvis during the Spring '08 term at WPI.

Page1 / 14

lecNew-23-Interrupt - WPI ECE2801 Foundations of Embedded...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online