Interrupt Sources - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Interrupt Sources

Description:

Four other signals (pins) that may be used as interrupt inputs: Pulse ... Receiver Overrun. RIE. I Bit. Receive Data Register Full. SCI Serial System. Register Mask ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 7
Provided by: ROTH8
Category:

less

Transcript and Presenter's Notes

Title: Interrupt Sources


1
Interrupt Sources
  • IRQ is a maskable, general purpose external
    interrupt request.
  • XIRQ is a non-maskable interrupt (after program
    enables it)
  • Four other signals (pins) that may be used as
    interrupt inputs Pulse Accumulator Input Edge,
    Timer Input Capture 1, 2 and 3.
  • There are ten internal interrupt sources Output
    Compare 1, 2, 3, 4 and 5, SCI, SPI, Pulse
    Accumulator Overflow, Timer Overflow, Real Time
    Interrupt are internal sources of Interrupts
  • There are four other special interrupts Illegal
    Opcode, COP Failure, COP Clock Monitor Fail and
    SWI are special interrupts.

2
Configuring Interrupts
  • Each source may have a global mask
  • Each source may have a local (or individual)
    mask/enable
  • Each source has a flag to indicate which
    interrupt is active
  • General routine
  • Install interrupt service routine
  • Configure source (peripheral)
  • Enable locally
  • Enable globally (CLI)

3
Interrupt Sources
4
More Sources
5
Interrupt Vectors
6
ISR
  • Do what you need to do
  • Clear the Interrupt Flag
  • The interrupt flag indicates which interrupt
    source caused the interrupt
  • You must clear that flag or the ISR will
    continually execute
  • You typically clear the respective flag by
    writing a 1 to that flags location
  • Ex
  • // real time interrupt flag RTIF (bit 6) in TFLG2
    indicates a RTI
  • ldaa 0b01000000
  • staa TFLG2 clears RTIF flag
  • Issue RTI
  • DO NOT issue CLI within ISR unless you know
    exactly what you are doing (nesting ISRs)
Write a Comment
User Comments (0)
About PowerShow.com