5502 blocked interrupt handling process

Source: Internet
Author: User

Step Description
Interrupt request sent to cpu The CPU used es a Maskable Interrupt request.
Set corresponding IFR flag When the CPU detects a valid Maskable Interrupt request, it sets and
Latches the corresponding flag in one of the interrupt flag registers (ifr0
Or ifr1). This flag stays latched until the interrupt is acknowledged or
The flag is cleared by software or by a DSP hardware reset. (See
Description of ifr0 and ifr1 in section 2.8.2 .)
Interrupt enabled in ier? The CPU cannot acknowledge the interrupt unless the corresponding
Enable bit is 1 in one of the interrupt enable registers (ier0 or ier1). (See
The description of ier0 and ier1 in section 2.8.3 .)
intm = 0? the CPU cannot acknowledge the interrupt unless the interrupt mode bit
(intm) is 0. that is, interrupts must be globally enabled. (see the
description of intm in section 2.10.2.8.
branch to interrupt service routine the CPU follows the interrupt vector to the interrupt service routine. while
branching, the CPU performs the following actions:
it completes instructions that have already made it to the decode
phase of the pipeline. other instructions are flushed from the pipeline.
it clears the corresponding flag in ifr0 or ifr1, to indicate that
interrupt has been acknowledged.
it saves certain registers values automatically, to record important
mode and status information about the interrupted program sequence
(see the description of automatic IC context switching in section 4.4 ).
it creates a fresh context for the ISR by forcing intm = 1 (globally
disables interrupts), dbgm = 1 (disables debug events ), and
eallow = 0 (disables access to non-CPU emulation registers)
execute interrupt service routine the CPU executes the interrupt service routine (ISR) that you have written
for the acknowledged interrupt. some registers values were saved
automatically during the branch to the ISR. A return-from-interrupt
instruction at the end of your ISR forces an automatic IC context restore
operation (see the description of automatic IC context switching in
section 4.4) to restore these register values. if the ISR shares other
registers with the interrupted program sequence, the ISR must save
other register values at the beginning of the ISR and restore these values
before returning to the interrupted program sequence
program continues If the interrupt request is not properly enabled, the CPU ignores the
request, and the program continues uninterrupted. if the interrupt is
properly enabled, its interrupt service routine is executed, and then the
program continues from the point where it was interrupted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.