[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
If interrupt occurs while the GIE bit is cleared, the GIE may unintentionally be re-enabled by user's ISR. The event that would cause this to occur are:
1. An instruction clears the GIE while an interrupt is acknowledgtd
2. The program branches to the interrupt vector and executes ISR (с чего бы это прога бренчес?)
3. The ISR complites...retfie...and program returns to the instruction after the one which was means to disable interrupts.
The method to ensure that interrupns are globally disabled is:
LOOP: ... ну, и так далее.
В новых доках пишут, что команда GIE=0 дополняется железом пустым циклом (nop), и тогда всё работает правильно.
E-mail: info@telesys.ru