Hi All,
I have a question on MSP430, is there any way I can disable all interrupts and then only enable 2 that I need? The problem is during some code execution I need to disable all the interrupts and after this code, I need to only enable 2 interrupts, the problem is, I don't know which Interrupts have been enabled before this code execution, so I cannot manually disable only the interrupts that I don't need, and to disable all interrupts one by one, except the ones I need, would mean a lot of extra code and I might miss one of all the interrupts that are in MSP430. The reason I don't know which interrupts have been previously enabled is that apart from my code, any arbitrary user code might be present on the firmware.
I don't know if I made myself clear, basically, I need something like this
__disable_interrupt();
//Do some code
//enable only 2 interrupts
//__enable_interrupt();
the problem with __enable_interrupt is that it only uses 1 global interrupt bit, which by setting it back would enable all the previously enabled interrupts. Is there any way to do what I need?