On Thu, Mar 27, 2003 at 11:10:04AM -0500, D.Pageau wrote: > do > { > IFG1 &= ~OFIFG; // Clear OSCFault flag > for (i = 0xFF; i > 0; i--); // Time for flag to set > } > while ((IFG1 & OFIFG) == OFIFG); // OSCFault flag still set?
Hi Pageau, The optimizer will detect this as "useless" loop and remove it. Instead of: for (i = 0xFF; i > 0; i--); try: for (i = 0xFF; i > 0; i--) __asm__ __volatile__("; loop"); See also: http://mspgcc.sourceforge.net/doc_appendixE.html Bye, Pedro