Hello,
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).
Thanks,
Max
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?
Daniel,
Yes, if before it was disabled I don't want to enable it.
Max,
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.
http://www.ti.com/lit/pdf/spru514
Regards,Daniel