in my code I have critical sections, were the interrupts are disabled. In other sections I have a blocking waits. I would like to have an assertion/error message, when I wait for a interrupt, which is disabled.
My idea was to directly read the IMAK (*pIMASK), but this was sometimes not correct. I read that the isr was disabled, but it wasn't.
Is there a better way? cki()?