This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"CPSIE I"on an ARMv7A not changing the I bit in the CPSR register in USR mode - why?

I'm using a CortexA8 and I can't seem to enable interrupts...! 

I'm using a "CPSIE I" instruction, I can see that the compiler (GCC) is not optimizing my code out... I have to manually stop the program with a debugger and update the I bit myself before I can see an interrupt fire..!? 

Why? Any help would be much appreciated!

Cheers!

Parents
  • Yes, it's because you are in User mode.  User mode can't control the interrupt masks (CPSR.I/F), as this would allow it to prevent re-entry into the OS.  (That doesn't mean that CPSR.I/F cannot be b1 in User mode, just that User mode cannot set them b1 itself).

    So yes, you would need to move to a privileged mode to change the state of the interrupt masks.  Typically that would be a system call, which would mean using a SVC.

Reply
  • Yes, it's because you are in User mode.  User mode can't control the interrupt masks (CPSR.I/F), as this would allow it to prevent re-entry into the OS.  (That doesn't mean that CPSR.I/F cannot be b1 in User mode, just that User mode cannot set them b1 itself).

    So yes, you would need to move to a privileged mode to change the state of the interrupt masks.  Typically that would be a system call, which would mean using a SVC.

Children
No data