90 likes | 188 Views
CSE3306. Lecture: 12 Title: Interrupts. Today's Topics. Demonstrate Timer Interrupt Critical Sections 8259 PIC ISR Scheduling. Timer Interrupt Demonstration. Program Overview Install on IRQ0 (INT 8) Call Original Timer Interrupt Increments Count=0..18
E N D
CSE3306 Lecture: 12 Title: Interrupts CSE3306--L12
Today's Topics • Demonstrate Timer Interrupt • Critical Sections • 8259 PIC • ISR Scheduling CSE3306--L12
Timer Interrupt Demonstration • Program Overview • Install on IRQ0 (INT 8) • Call Original Timer Interrupt • Increments Count=0..18 • Increments SecCount when Count=18 • Running Program prints SecCount • Termination Restores Interrupt CSE3306--L12
Critical Sections • STI: SeT Interrupt enableAllow other routines to be serviced • CLI: CLear Interrupt enable Retain full control of CPU CSE3306--L12
8259 PIC (Programmable Interrupt Controller) • Latches incoming interrupt signals (IRQ signal) • Allows masking interrupts (except NMI) • Prioritizes Interrupts (IRQ 0==Highest) • IF (interupt unmasked) AND (interrupt flag=1) AND (not servicing higher interrupt) THEN call interrupt CSE3306--L12
ISR Scheduling CSE3306--L12