05-25-2020 09:30 AM
I want to detect if I'm in the interrupt or in the normal context during runtime on Microblaze.
I want to read a register of the processor, which tells me that I'm in an interrupt context.
Is it possible?
07-13-2020 07:01 AM - edited 07-13-2020 07:03 AM
Hi @betontalpfa
The UG984 states the following:
The interrupt return address (the PC associated with the instruction in the decode stage at the time of the interrupt) is
automatically loaded into general purpose register R14. In addition, the processor also disables future interrupts by
clearing the IE bit in the MSR. The IE bit is automatically set again when executing the RTID instruction.
I guess that probably you can just check the MSR register, unless you perform IE disabling out of that context.
Regards