#4587 - rome - Thu Apr 03, 2003 9:32 pm
?m using startfiles (crt0.s lnkscript, etc...) from GCC compiler. And i wanna setup my interrupt handler correctly. i do something like that:
that?s correct? There is any Register unsaved? Processor State changed, context error on return etc...
Thanks a lot!!!!
Code: |
void InterruptProcess() { if (REG_IF & INT_TIMER1) { //Handling Timer 1 } else if(REG_IF & INT_TIMER0) { // Handling Timer 0 } REG_IF |=REG_IF; } void main() { REG_INTERUPT = (u32)&InterruptProcess; REG_IE = 0x18; REG_IME = 1; ... ... // bla bla bla.... } |
that?s correct? There is any Register unsaved? Processor State changed, context error on return etc...
Thanks a lot!!!!