This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil 8051 interrupt ISR

I'm having problems with 8051 based ISRs. The problem occures when:

1- Interrupt A is being serviced.
2- Interrupt B occures and is serviced (in the middle of ISR A execution.
3- Sometimes ISR A fails to complete.

I'm using the C ISRs used in C51 without any register set defined ("using xx"). My understanding is that the ISRs should get entered and serviced mutually exclusive from one another without corrupting one another's stack. Is this not the case?

Parents
  • "Pray tell how to code to ensure so that e.g. a switch connected to EI0 does not get closed again within, say, 17ms ?"

    You've got to realise - It is not being said (or even suggested) that nested interrupts are obligatory.

    You're example is just not the type of situation where they would be necessary; therefore it is not an issue.

    If you cannot think of a reason to use them, or think that they have an advantage, or feel incapable of writing safe code that would benefit from their use then the answer is simple ... You should not consider risking it.

    However ... Don't mark a mechanism as floored simply because you cannot do it.

Reply
  • "Pray tell how to code to ensure so that e.g. a switch connected to EI0 does not get closed again within, say, 17ms ?"

    You've got to realise - It is not being said (or even suggested) that nested interrupts are obligatory.

    You're example is just not the type of situation where they would be necessary; therefore it is not an issue.

    If you cannot think of a reason to use them, or think that they have an advantage, or feel incapable of writing safe code that would benefit from their use then the answer is simple ... You should not consider risking it.

    However ... Don't mark a mechanism as floored simply because you cannot do it.

Children