Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] LPC2129 ARM7 Disable/Enable Interrupt..

2005-05-13 by Robert Adsett

At 10:57 AM 5/12/05 +0200, 42Bastian Schick wrote:
>Kasper,
>
> > Inline asm, that I have found and plan to use:
> >
> > #define IENABLE                       \
> >   __asm { MSR     CPSR_c, #0x1F }    /* Enable IRQ (Sys Mode)   */   \
> >
> > #define IDISABLE                      \
> >   __asm { MSR     CPSR_c, #0x92 }     /* Disable IRQ (IRQ Mode)  */   \
>
>
>a) You must be sure you are in ARM mode.
>b) You must be at least in SYS mode.
>c) You should not switch CPU state unless you are sure you know what you
>are
>doing :-)

to which I would add

d) use a disable/restore pair rather than a disable/enable pair.

>I always suggest a small assmembly routine.

Also a simple commented version available in the newlib-lpc 
support.  Easily separable.  GNU based but short and simple.

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/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.