Yahoo Groups archive

Lpc2000

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

Thread

Disable()/Restore()

Disable()/Restore()

2004-05-06 by James Dabbs

I'm looking for some assembler reference code to disable and restore
interrupts -- in thumb mode.  Working through something by hand, I just
seem to require a lot of instructions to do it.  In fact ARM takes a few
instructions to do it..  I suspect there is some trick to this but
Google has failed me..

Any tips would be most welcome!

Thanks,

James Dabbs, TGA

Re: [lpc2000] Disable()/Restore()

2004-05-06 by Sten Larsson

James,

You have two options in Thumb mode:

(1) Switch to ARM mode and disable interrupts in the CPSR, then switch back.
(2) Disable interrupts in the interrupt controller.

There is no trick...

/sten
Nohau Corp

----- Original Message ----- 
Show quoted textHide quoted text
From: "James Dabbs" <jdabbs@...>
To: <lpc2000@yahoogroups.com>
Sent: Thursday, May 06, 2004 9:56 AM
Subject: [lpc2000] Disable()/Restore()


> I'm looking for some assembler reference code to disable and restore
> interrupts -- in thumb mode.  Working through something by hand, I just
> seem to require a lot of instructions to do it.  In fact ARM takes a few
> instructions to do it..  I suspect there is some trick to this but
> Google has failed me..
>
> Any tips would be most welcome!
>
> Thanks,
>
> James Dabbs, TGA
>
>

Re: Disable()/Restore()

2004-05-06 by embeddedjanitor

If you disable interrupts using the interrupt controller be aware of 
the spurious interrupt issues (mentioned in earlier postings).


--- In lpc2000@yahoogroups.com, "Sten Larsson" <stenl@n...> wrote:
> James,
> 
> You have two options in Thumb mode:
> 
> (1) Switch to ARM mode and disable interrupts in the CPSR, then 
switch back.
> (2) Disable interrupts in the interrupt controller.
> 
> There is no trick...
> 
> /sten
> Nohau Corp
> 
> ----- Original Message ----- 
> From: "James Dabbs" <jdabbs@t...>
> To: <lpc2000@yahoogroups.com>
> Sent: Thursday, May 06, 2004 9:56 AM
> Subject: [lpc2000] Disable()/Restore()
> 
> 
> > I'm looking for some assembler reference code to disable and 
restore
> > interrupts -- in thumb mode.  Working through something by hand, 
I just
> > seem to require a lot of instructions to do it.  In fact ARM 
takes a few
Show quoted textHide quoted text
> > instructions to do it..  I suspect there is some trick to this but
> > Google has failed me..
> >
> > Any tips would be most welcome!
> >
> > Thanks,
> >
> > James Dabbs, TGA
> >
> >

Re: [lpc2000] Re: Disable()/Restore()

2004-05-06 by Bill Knight

I can post some gcc routines for disabling, enabling, and restoring
interrupts on the ARM.  They must be compiled in ARM mode with the
-mthumb-interwork option to be used with thumb code.  Any thumb code
that calls them will also need to be compiled with the -mthumb-interwork
option.

Regards
-Bill Knight
the ARM Patch



On Thu, 06 May 2004 23:19:00 -0000, embeddedjanitor wrote:

If you disable interrupts using the interrupt controller be aware of 
the spurious interrupt issues (mentioned in earlier postings).


--- In lpc2000@yahoogroups.com, "Sten Larsson" <stenl@n...> wrote:
> James,
> 
> You have two options in Thumb mode:
> 
> (1) Switch to ARM mode and disable interrupts in the CPSR, then 
switch back.
> (2) Disable interrupts in the interrupt controller.
> 
> There is no trick...
> 
> /sten
> Nohau Corp
> 
> ----- Original Message ----- 
> From: "James Dabbs" <jdabbs@t...>
> To: <lpc2000@yahoogroups.com>
> Sent: Thursday, May 06, 2004 9:56 AM
> Subject: [lpc2000] Disable()/Restore()
> 
> 
> > I'm looking for some assembler reference code to disable and 
restore
> > interrupts -- in thumb mode.  Working through something by hand, 
I just
> > seem to require a lot of instructions to do it.  In fact ARM 
takes a few
> > instructions to do it..  I suspect there is some trick to this but
> > Google has failed me..
> >
> > Any tips would be most welcome!
> >
> > Thanks,
> >
> > James Dabbs, TGA
> >
> >





Yahoo! Groups Links

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.