msp430 - How to enable nested interrupts in msp430g2553? -


i want enable nested interrupts on msp430 want use uart in isr of timer. appreciated.

whenever msp430 microcontroller start execute interrupt handler function, first thing disable global "interrupts enabled" flag, bit in status register r2. prohibits interrupt nesting default.

to work around this, enable interrupt setting register flag 1 @ start of interrupt handler functions. simplify syntax, there's eint instruction this:

asm("eint"); 

typically there compiler-specific macros emnabe let avoid writing assembly code. should work both gcc , iar:

__enable_interrupt(); 

(please, not abuse interrupt nesting. in cases there's absolutely no need it. it's better idea change design go it.)


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -