I am working with the Stellaris LaunchPad board with the LM4F120H5QR processor. I am programming using the CCS tool set version 5.2.1.00018.
From looking at some of the example programs I see that there are two functions that I can call in the ROM from my program to facilitate the enabling and disabling of interrupts. These functions are:
ROM_IntMasterEnable();
ROM_IntMasterDisable();
Sometimes it is necessary to create a subroutine that internally needs to have interrupts disabled to ensure atomic access to a memory object. My problem here is that in some cases I need to be able to call this particular type of subroutine from execution threads where interrupt are enabled ahead of time and others where interrupts are already disabled. I need to be able to have my subroutine check in entry / exit to be able see if interrupts are enabled/disabled so that I can set the interrupt state at exit to the same as it was at entry, Is there a special function in the ROM that allows fetching the current interrupt state so I can save it into a variable in my subroutine:
Michael Karas