cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupts

sbivens
Associate II
Posted on July 12, 2005 at 11:48

Interrupts

3 REPLIES 3
sbivens
Associate II
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

najoua
Associate II
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,

sbivens
Associate II
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.

:-?