cancel
Showing results for 
Search instead for 
Did you mean: 

PSR question

johnchang
Associate II
Posted on November 15, 2004 at 22:49

PSR question

2 REPLIES 2
johnchang
Associate II
Posted on November 02, 2004 at 06:48

Hi:

I have a problem and need your help.

I want to Enable or Disable IRQ and FIQ in PSR.

But It does not work properly.

It is my sample code below.

There are 3 steps

1. Enable FIQ, IRQ

2. Disable FIQ, IRQ <--------Fail, CPSR does not change in Realview Register window.

3. Enable FIQ, IRQ <--------Fail

Thanks for your help

;************************************************

PRESERVE8

AREA Init, CODE, READONLY

Mode_USR EQU 0x10

Mode_FIQ EQU 0x11

Mode_IRQ EQU 0x12

Mode_SVC EQU 0x13

Mode_ABT EQU 0x17

Mode_UNDEF EQU 0x1B

Mode_SYS EQU 0x1F ; available on ARM Arch 4 and later

I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled

F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled

ENTRY

Reset_Handler

MSR CPSR_c, Mode_USR ;Enable FIQ and IRQ

MSR CPSR_c, Mode_USR

R:F_Bit

R:I_Bit ;Disable FIQ, IRQ

MSR CPSR_c, Mode_USR

END

yu-jun
Associate II
Posted on November 15, 2004 at 22:49

If my system runs in USER mode, I want to disable FIQ and IRQ, how to do?