2004-07-11 03:28 PM
2004-07-09 09:22 PM
I have a lite timer 1 interrupt to control pulse width. But after several pulse are produced the interrupt is disabled unexpected. If I add ''_asm(''nop'')'' or any other codes to ISR this is not going to happen. Why would _asm(''nop'') affect my routine ?
My ISR codes: { iSoftMCount++; if(iSoftMCount>=3000) // Overflow { StaticFlag = 1; ucHallFlag = 0; LITE1_disableINT; iSoftMCount = 0; } LTCSR1 &= 0xf7; _asm(''nop''); } Some judgement in MAIN: LITE1_disableINT; // Disable INT when compare if(iSoftMCount>=iStopCount) // Stop { iSoftMCount = 0; ucStep = 0; PBDR |= 0x02; // produce pulse } LITE1_enableINT; Any one has any ideas?2004-07-11 03:28 PM
I've changed C compiler (COSMIC) to an old version and the problem seemed to get resolved.
I am so worried about those compilers.