Yahoo Groups archive

Lpc2000

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

Message

Disabling interrupts from Thumb mode

2005-02-08 by Richard

Keil does seem to support ARM/thumb interworking.  I have added a
source file which produces ARM code to the project, the rest of which
is in thumb mode.  I have added the following assembly in an attempt
to disable interrupts before switching back to thumb mode.  The code
appears to compile and debug fine but I am not seeing the I and F bits
in the CPSR being set.  Any ideas would be appreciated.

Richard

void arm_Idisable(void){
__asm { MRS		R1, CPSR          
	ORR		R1,R1,#0XC0         
	MSR		CPSR_C, R1           
      }
  }




void arm_Ienable(void)
	{
__asm {
	MRS		R1, CPSR          
	BIC		R1,R1,#0XC0         
	MSR		CPSR_C, R1
       }   
   }

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.