We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello Forum, I wanna disable interrupts on my 80C167. As far as I understood the User Manual, writes to the PSW (containing the IEN bit and the Interrupt-Level) will take place about two cycles later, which leads to the following effect: If during this very two cycles an Interrupt Request occurs, this interrupt will be accepted and executed, while the PSW-changes took place. This means, during the execution of the interrupt service routine, all other interrupts are disabled, even the higher prioritized, which leads to problems, in particular if it takes a long time to execute. This is what I mean by "realtime unsafe". If I use
#pragma DISABLE
Hello Mike, the statement you referred to says only that you have to add NOPs or other interruptileable stuff after changing PSW and before you are "IRQ-Safe". We have to keep two different things apard: - Machine commands after PSW-change take place before being "IRQ-Safe". - Interrupt Accepatance in this gap leads to unwanted higher-level-interrupt-blocking. The Keil #pragma DISABLE code keeps in mind the first point (by adding two NOPs), but in my opinion doesn't handle the second point. But there is another thing that maybe could happen. Please see my answer to my answer to Scott's posting. Thanks - Peter