beautypg.com

Figure 7–9. nmi/oscfault interrupt handler, Lfxt1 and xt2 oscillators 7-9 basic clock module – Texas Instruments MSP430x1xx User Manual

Page 109

background image

LFXT1 and XT2 Oscillators

7-9

Basic Clock Module

Figure 7–9. NMI/OSCFault Interrupt Handler

Start of NMI Interrupt Handler

Reset by HW:

OFIE, NMIE, ACCIE

OFIFG = 1

ACCVIFG = 1

NMIFG = 1

No

No

No

Select DCO For MCLK

SELM.1 = 0

Reset ACCVIFG

Reset NMIIFG

User’s Software,

Oscillator Fault

Handler

User’s Software,

Flash Access

Violation Handler

User’s Software,

External NMI

Handler

OFIFG = 0

OFIFG = 0

No

Yes

Yes

Yes

Reselect Failed

XT Oscillator

Yes

Set NMIE, OFIE,

ACCVIE Within One

Instruction

RETI

End of NMI Int. Handler

Example1:

BIS.B #(NMIIE+OGIE+ACCVIFG), &IE1

Example2:

BIS.B Mask, &IE1

; Mask Enables Only

; Interrupt Sources

; That are Needed

Optional

Note: Example for MSP430F1xx device