cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt generation via xxIR

komka_p
Associate
Posted on February 24, 2004 at 09:53

Interrupt generation via xxIR

3 REPLIES 3
komka_p
Associate
Posted on February 20, 2004 at 06:41

Hi everybody,

(why) is it absolutely safe to set xxxIR=1 ?

(e.g. CC9IR=1)

This is the interrupt request bit, which may be set by hardware also.

What if I and the hardware set it simaultaneously?

If it is guaranteed that 2 separate interrupts (isr-routine-call) will happen: then, in what order? (priority, arbitration)

najoua
Associate II
Posted on February 23, 2004 at 10:28

Hello,

*** You haven't to put xxxIR=1 because it is set automatically by hardware. It's better to clear it at the end of the interrupt.

*** If you have two different interrupts with the same priority they will be both executed . If they have different priorities, the one with the highest priority will be serviced.

maxime2399
Associate II
Posted on February 24, 2004 at 09:53

If you set xxxIR by software and an interrupt occurs at the same time there is a chance to miss one of the two interrupts.

This will happen if the two set operations (the hardware and the software) are done before the actual clearing of the flag while servicing the interrupt.

The probability of occurrence of the case 'one interrupt is missing' will increase if there is higher priority interrupts running as they may delay the clearing of the flag.