ARM Cortex M0(PGA970) set Primask/disable interrupts

Hi guys,
I wanted to disable interrupt's since they cause my programm to be less accurate during a critical point of my programm. I found the function __disable_irq() which I can't use (My compiler tells me that function was never declared). Same goes for NVIC_DisableIRQ...

I tried to manually write 0x00000001 to the CTRL_PRI which should also set the primask bit but it didnt seem to work, as __get_PRIMASK(); returns 0.
are there any other attemps I could use?

  • figured out that __set_PRIMASK(1); works and __get now returns the 1 as desired.
    But although PRIMASK bit is set, Systick is still allowed to count down on SYST_CVR (current value register) and set COOUNTFLAG.
    So somehow PRIMASK doesnt disable all Interrupts.

More questions in this forum