This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ISR



Hi 

I have a very basic question .

I am working on C6670.

Can i invoke another interrupt in an ISR itself ?

for example 

ISR()

{

some_queue_push_operation_foo( ) ;  // this push invokes another ISR

}

This is some kind of recursive interrupt.

With Regards

Rahul Sharma

  • When in an ISR, the GIE (Global Interrupt Enable) is off.  You can set the event, but the interrupt will not be taken until you exit the current ISR (i.e. they won't be nested.)

    Best Regards,
    Chad

  • As already saied, the interrputs are normally disabled in an ISR, so the new interrupts will be served as soon as you return from the previous. Anyway You can reenable interrupts in your ISR so to nest them, but the underlaying Operative System (SYS/BIOS?) must support nested interrupts.

  • Yes, as Alberto mentioned if using an OS, that has something along the lines of a SW Interrupt, where it's handled by SW and not true HW interrupts it's possible to do this. The term ISR is normally reserved for the usage with a HW interrupt, in which case it is required to disable the interrupts during processing because we're using physically registers such as the IRP to keep track of where to return for example so that we can put everything back the way it was when it's done processing.  With limited HW resources that means we cannot take any interrupts while processing another (the exception being an NMI or Reset which overrule GIE setting and are always processed.)  That said as Albert pointed out, SW interrupts could be implemented which do not use this HW but instead store the information in memory it has reserved and it can support nesting of these SW Interrupts, but they should not be referred to as ISRs.

    Best Regards,
    Chad