Re: Using Interrupt Flags as Event Latches without Interrupt Enable/Firing
Do Not make this difficult for yourself.
Do not construct problems that do not exist.
Interrupt Flag bits, like CLCxIF,
Do Not depend upon Interrupt Enable bit, like CLXxIE.
Interrupt Flag bit CLCxIF belong to the CLC peripheral,
and is set by the peripheral when conditions are right, independent of CLCxIE.
Interrupt Enable bits, CLCxIE belong to the Interrupt controller hardware,
and determine if interrupt controller shall react to the Interrupt Flag.
Only when corresponding ...IF bit and ...IE bit are both 1, and GIE and PEIE are also both 1,
will a interrupt be processed.
You should have learned a long time ago, that you may poll Interrupt Flag bits in software,
when Interrupt Enable is Clear == 0.
Be aware, that for some peripherals, Interrupt Flag bits go back to 0 == Clear,
when the condition causing interrupt request is no longer there.