Brief process of c66x DSP interruption:
1. enable global interruption and sub-interruption. If the hardware detects the interruption, the CPU will jump.
2. The software pushes the values of Class A and Class B registers inside the CPU into the stack for storage, put the value of the current PC Register into the IRP/NRP register for interruption return to find the currently interrupted position.
3. The PC pointer of the CPU reads the address of the interrupt vector table, that is, the "istb value of the istp register + the offset of the sub-interrupt vector" is loaded into the PC register, so that the jump is executed.
4. Jump commands are usually used in the interrupt vector table, so that we can jump to the interrupt service subroutine compiled in C language. Because we have added the interrupt keyword before the general interrupt service subroutine function. Then the compiler will change the statement returned by the function to B irp/NRP (B is a jump command), so that the value of IRP/NRP is sent to the PC register. (Service Interruption)
5. Before the CPU jumps, it will stack the previously saved values in the stack to its corresponding registers.
Table 6-2 lists the interrupt control registers on the CPU: