cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
262 Views
Registered: ‎10-12-2018

How can I detect the interrupt context on Microblaze?

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?

Tags (2)
0 Kudos
Reply
1 Reply
Xilinx Employee
Xilinx Employee
157 Views
Registered: ‎10-06-2016

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


Ibai
Don’t forget to reply, kudo, and accept as solution.