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

enable_irq()/disable_irq() in ARMCC V4

Hi everyone,

I have posted to this forum a couple months ago about using the enable_irq()/disable_irq() instruction intrinsics in RealView Compiler (ARMCC V4.0.0.728). In that occasion, I set up two software interrupts for calling such intrinsics, as they only have the intended effect when not in User Mode.

Just now, though, I realized that interrupts were not being disabled. I know for a fact that my SWI are set up appropriately, because they change the value of a flag I set up. Does anyone have any clue what could be happening? Documentation seems to be pretty clear about the fact that one enters supervisor mode during SWI, and that would be appropriate for enabling/disabling interrupts, but I must be missing something.

Relevant source code

void __SWI_8 (void)
{
  __enable_irq();
  __enable_fiq();
  interrupts_enabled = 1;
}

void __SWI_9 (void)
{
  __disable_irq();
  __disable_fiq();
  interrupts_enabled = 0;
}

Relevant links

Instruction Intrinsics
http://www.keil.com/support/man/docs/armcc/armcc_chdfgfab.htm

disable_irq()
www.keil.com/.../armccref_CJAFBCBB.htm

enable_irq()
www.keil.com/.../armccref_CJAEAEHA.htm

ARMCC: MODIFY IRQ FLAG TO ENABLE/DISABLE INTERRUPTS (RealView Compiler V3)
http://www.keil.com/support/docs/3229.htm

Thanks in advance,
--
George Andrew Brindeiro
Robotron Automation and Technology