Skip to main content
Visitor II
July 12, 2005
Question

Interrupts

  • July 12, 2005
  • 3 replies
  • 806 views
Posted on July 12, 2005 at 11:48

Interrupts

    This topic has been closed for replies.

    3 replies

    sbivensAuthor
    Visitor II
    July 9, 2005
    Posted on July 09, 2005 at 18:34

    This is from my Keil Compiler documentation.

    Do not use the IEN bit in the PSW to disable interrupt. If you set IEN to 0, the PSW gets updated two instruction later. During this time, if an interrupt occurs, the interrupt system is blocked for the entire interrupt function and not just for the C statements you are trying to protect.

    Is there an Application Note on the in and outs of disabling interrupts on the ST10F269?

    Will this code work?

    ATOMIC #03H

    BCLR IEN

    NOP

    NOP

    Visitor II
    July 12, 2005
    Posted on July 12, 2005 at 05:16

    Hello,

    Please refer to the following link:

    http://www.keil.com/support/man/docs/c166/c166_xf_interrupts.htm

    Yes, your code works.

    Regards,

    sbivensAuthor
    Visitor II
    July 12, 2005
    Posted on July 12, 2005 at 11:48

    Is there no detailed documentation on ST10F269 interrupts? The Keil link leaves the impression that there is some problem with using IEN. The Keil solution does not address the problem of not knowing the interrupt level before interrupts are disabled and then restoring it after.

    :-?