Question

In: Electrical Engineering

Explain the operation(s) performed by a return from an IRQ or FIQ interrupt procedure

Explain the operation(s) performed by a return from an IRQ or FIQ interrupt procedure

Solutions

Expert Solution

Normal Interrupt (IRQ) or Fast Interrupt (FIQ) are exceptions which are generated by external hardware signals. When an exception occurs, ARM completes current instruction as best it can. It departs from the current instruction sequence to handle the exception by performing the following steps:-

1. It changes the operating mode corresponding to the particular exception.

2. It saves the current Program Counter (PC) to the new mode.

3. It saves the old value of CPSR in the Saved Processor Status Register of the new mode.  

4. It disables exceptions of lower priority.  

5. It forces the PC to a new value corresponding to the exception. This is effectively a forced jump to the Exception Handler or Interrupt Service Routine. A unique address is pre-defined for each exception handler (IRQ, FIQ, etc), and a branch is made to this address. The address to which the processor is forced to branch to is called the exception/interrupt vector.

Once the exception has been handled (by the exception handler), the user task is resumed. The Interrupt Service Routine must restore the user state exactly as it was before the exception occurred:

1. Any modified user registers must be restored from the handler’s stack. This must be done by the user.

2. The Current Program Status Register (CPSR) will be restored from the appropriate Saved Processor Status Register (SPSR) by the processor. This will be the same as in the case of subroutines.

3. PC must be changed back to the instruction address in the user instruction stream by the user.

Since exceptions can arise at the same time, a priority order has to be clearly defined. If an FIQ and IRQ are occurring at the same time, the FIQ will have higher priority. The ARM microcontroller will attend the FIQ exception and remember that the IRQ handler. After the exception returns from FIQ, the Interrupt Service Routine will return to the IRQ.


Related Solutions

Explain the main purpose of an interrupt signal. Give an example of how the interrupt is...
Explain the main purpose of an interrupt signal. Give an example of how the interrupt is used.
Explain the "Separate Procedure" designation as it pertains to certain CPT codes performed during the course...
Explain the "Separate Procedure" designation as it pertains to certain CPT codes performed during the course of an operation.
Explaining how Lobectomy or pneumonectomy (entire lung) procedure is performed, the risk of the procedure, and...
Explaining how Lobectomy or pneumonectomy (entire lung) procedure is performed, the risk of the procedure, and nursing considerations related to the procedure.
Is there an outpatient procedure that needs to be performed in order to have the implant...
Is there an outpatient procedure that needs to be performed in order to have the implant inserted into the patient?
Is there an outpatient procedure that needs to be performed in order to have the implant...
Is there an outpatient procedure that needs to be performed in order to have the implant inserted into the patient?
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control...
How does an interrupt differ from a subroutine? When an interrupt occurs, where does program control branch to?
1:Explain what is an interrupt and its process.                                  &nbs
1:Explain what is an interrupt and its process.                                                                   2:State any three difference between top-down and bottom-up design strategies 3:What is the difference between Interrupt and polling technique? Which one is preferable and why?
An evaluation of R was performed, following the procedure described in this module. The barometric pressure...
An evaluation of R was performed, following the procedure described in this module. The barometric pressure was 736 torr, the temperature was 295 K and the volume of hydrogen gas collected was 35.6 mL. The calculated value of R was 82.1 mL atm K. 1) How many grams of magnesium metal were used? 2) If the vapor pressure of water had not been taken into account, what would have been the calculated value of R? 3) If the syringe volume...
observation inventory is a general auditing procedure that will be performed whenever it possible a) what...
observation inventory is a general auditing procedure that will be performed whenever it possible a) what part should be the auditor play in the planning phase of physical inventory b) describe the procedures performed by the auditor during their observation of a client physical inventory
4. The following procedure performed by a candy manufacturer is the best example of a product...
4. The following procedure performed by a candy manufacturer is the best example of a product level activity within a manufacturing cost hierarchy: Select one: a. Resetting the packaging equipment to wrap a special 36-count Halloween package b. Developing an advertising campaign for a special Halloween candy c. Inspecting the quality of the candy produced during one of the special Halloween package production runs d. Cleaning the mixing machine for the next production run of candy, a special Halloween candy...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT