??? 08/15/05 11:57 Read: times |
#99410 - excellent point! Responding to: ???'s previous message |
Oleg Sergeev said:
- if an interrupt with this code has high priority level and occures during low-priority one is in progress then after recovering from program initialization you will lost low-level interrupts in the whole. It is because they are still blocked (need another reti). I think I have already seen a solution for this, too - wasn't there a similar problem discussed here a couple of months ago? So I would modify the few lines from my previous post as: clr ea ;disable all interrupt (better maybe mov ie,#0) call RetiSub ;release internal interrupt-in-progress flag call RetiSub ;and again to clear also high-level interrupts ;add more call RetiSub ; if more than 2 interrupt levels are available (e.g. in RD2s) jmp 0 ;restart ;restart contains explicit reset of stack pointer, ; so no other stack housekeeping is needed RetiSub: retiJan Waclawek |