[quote:1b5c000cc6="Vincent"]then here is the main code[/quote:1b5c000cc6]
Hmm, one can't compile that, even the declaration which interrupt is used for the ISR is missing.
[quote:1b5c000cc6]but the "disable interrupt" seems not working.... [/quote:1b5c000cc6]
It makes no sense to disable interrupts within the ISR, they are automatically disabled there.
I can't say that much from this incomplete code, but one problem could be, that the so called flag-registers always memorize one pending interrupt-event.
Doesn't matter, even if interrupts are disabled, one event is kept, and as soon you re-enable interrupts, it is executed at once.
Also you should reset your flag somewhere in your code, don't you think so ?
↧