AnsweredAssumed Answered

218x IFC register

Question asked by vertigo on Oct 6, 2011
Latest reply on Oct 8, 2011 by Mitesh

I have 2188 legacy code and the following code is executed right after boot from flash:



     dis ints;                  //disable interrupts globally

     dis ar_sat;              //disable ALU saturation mode

     imask = 0;              //disable servicing of all interrupts

     ifc = 0xFFFF;         //reset all pending interrupts
     icntl = 0x00;          //disable interrupt nesting


My question is - doesn't the IFC = 0xFFFF statement clear and force their corresponding interrupts?

Why would someone do this and what would be the expected result?


If the corresponding comment is correct it seems that you would do IFC = 0x00FF.  If I

understand the IFC register correctly IFC = 0xFF00 would force the corresponding ISRs to execute

but because imask = 0 the ISRs will not run - so what is the reason for doing this?


We have a processor that runs "program 1" and then we boot from flash to execute "program 2"

and both programs use autobuffering for RX sport0.   How does program 2 ignore any residue that

might exist in rx0 from the previous program since the autobuffering continues to run while the boot occurs?


IFC = 0x4000  - will this clear out rx0 if the MASK has the ISR enabled or does the MASK make a difference?