Skip to main content
komka_p
Associate
February 24, 2004
Question

Interrupt generation via xxIR

  • February 24, 2004
  • 3 replies
  • 865 views
Posted on February 24, 2004 at 09:53

Interrupt generation via xxIR

This topic has been closed for replies.

3 replies

komka_p
komka_pAuthor
Associate
February 20, 2004
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
February 23, 2004
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 III
February 24, 2004
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.