At 08:34 PM 27/02/2005 +0100, you wrote: >Roland wrote : > >> is it prudent to clear all other flags in the PIR1 register >> that are not being used, before exiting, 'just in case'? >> >> Obviously the IE for those functions were setup to zero, but >> could a glitch cause a re-interrupt loop? > >Only if that glitch would set ("un-clear") the IE flag... > >I have never seen any recomendation to re-clear >every IF flag on each interrupt "just in case". > >It would help to know why you ask. Have you seen >any problem where it looks like this could be the cause ? > >Regards, >Jan-Erik. > I only ask to find out if it's good programming practise, part of the 'assume nothing' philosophy. Because, if it did happen out in the field, and cause the product to hang, it'd be hard to ascertain that as a cause. Basically, something I made is hanging about once a week(automotive), and I'm wondering about all the possibilities. But, if it were (long shot) the problem, my external wdt will cause a reset, and all the IE's are 0 on POR, so, looking elsewhere..... Regards Roland Jollivet -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist