Is there any way to read the global interrupt mask (INTM) bit of a Piccolo device from C code?
I need to temporally disable all the interrupts (DINT) in a function and then restore the value that INTM had before (enable them (EINT) ONLY if they were enabled).
Why do you need to check INTM? Why can't you just use DINT followed by an EINT?
Are you saying that they might already be disabled and you don't want to always re-enable them?
Yes, if before it was disabled I don't want to enable it.
Take a look at SPRU514D, specifically Table 7-6 C/C++ Compiler Intrinsics.
The __disable_interrupts(); and __enable_interrupts( ); functions might be what you are looking for.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.