At 08:51 AM 5/14/06 +0000, vlads4377 wrote:
>Nested enable/disable interrupt problem !!!
>
>f_1 ()
>{
> __disable_interrupt()
>
> f_2 ();
>A:
> __enablea_interrupt()
>}
>
>f_2 ()
>{
> __disable_interrupt()
>
> __enable_interrupt()
>}
>
>The problem is that at point A: f_1() assumes that interrupts are
>disabled, but f_2() already enabled the interrupts.
This is one example showing why you should (almost) never use interrupt
disable/enable but interrupt disable/restore. See
http://www.aeolusdevelopment.com/Articles/download.html There is a set of
disable/restore there that could be easily extracted from the rest of the
library. There is documentation for using the routines at
http://www.aeolusdevelopment.com/Articles/docandapp.html
Robert
" 'Freedom' has no meaning of itself. There are always restrictions, be
they legal, genetic, or physical. If you don't believe me, try to chew a
radio signal. " -- Kelvin Throop, III
http://www.aeolusdevelopment.com/Message
Re: [lpc2000] Nested enable/disable interrupt problem !!!
2006-05-14 by Robert Adsett
Attachments
- No local attachments were found for this message.