2008-07-27 10:26 PM
2008-07-27 02:22 AM
Hello,
I'm trying to measure out a pwm signal using the input capture of timer a. The interrupt is triggert but the micro seems to hang up when it should return from ISR. my code: void TIMERA_IT_Routine(void){ unsigned char Temp; /* Insert your code here... */ Temp = TAIC1HR; Temp = TACSR; Temp = TAIC1LR; } By now the ISR should do nothing but return. I hope somebody can help me! Regards2008-07-27 09:51 PM
Hi Kounst,
to generate an 'IRET' instead of a 'RET' at the end of your routine, you have to qualify this routine as interrupt routine. You can do it with at COSMIC: @interrupt void TIMERA_IT_Routine(void){... at Metrowerks (Hiware): #pragma TRAP_PROC or #pragma TRAP_PROC SAVE_REGS void TIMERA_IT_Routine(void){... Ensure that all the used registers have been saved! Read the manual to find out how to do this with your compiler. Regards, WoRo2008-07-27 10:26 PM
Danke!! :)
That was not really the solution but it helped me find the actual problem. my code was: @interrupt ... extern int count; void ISR{} So ''@interrupt'' wasn't missing but ''extern int count'' may not stand in between. Best Regards