We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
Anybody knows how disable global interrupts on STR912FAW44 using MDK-ARM 4.12 toolchain? I'd need to protect some routines from VIC0 and VIC1 interrupt requests. In other words the execution of these routines must be atomic.
Thanks in advance, Gaston
You can do it in the VIC itself, or via the CPSR. Check your user manual - maybe there are specific ways for this chip that I'm not aware of right now. Note that you probably need to be in supervisor mode to do it.
Or you can write your code in a SWI function, assuming it works the same on a ARM9 chip.
"Or you can write your code in a SWI function, assuming it works the same on a ARM9 chip."
Yes, it does.
Tamir, thank you for replying. I'll take a look to VICx->INTECR in order to disable interrupts globally but I'm not able to find CPSR in the reference manual. Could you tell me what CPSR means?
Regards, Gaston
CPSR = Current Program Status Register
It might be called differently on an STR9...
"It might be called differently on an STR9..."
It's the same.
IB, I'm not able to find CPSR at all... I've searched in RM0006 Reference Manual and STR91xFAxxx datasheet without success. Any suggestion?
Probably because this register (and others) are common stuff to all ARM7/9 cores. You should look online, or in a architecture reference manual. Did you try to google "ARM9 CPSR"...?
Once again, Tamir is right.
If you look in the file:
\Keil4\ARM\Boards\Keil\MCBSTR9\Blinky\STR91x.s
you will see an example of it's use, although that is accessing as CPSR_c