三:ARM公司设计NVIC:
some of the registers are saved onto the stack automatically 这段话表明了在处理中断的时候,外了恢复中断程序,ARM 公司把一些寄存器保存到堆栈中,在返回的时候自动恢复,
when an exception is accepted, and are also automatically restored in an exception
return sequence. This mechanism allows the exception handlers to be written as
normal C functions without any additional software overhead.
Set up the priority level of the required interrupt (this step is optional)
• Enable the interrupt generation control in the peripheral that triggers the interrupt
• Enable the interrupt in the NVIC
这段话告诉我们:当要使用中断的时候,第一步:使用外部中断的使能(就好比开时钟一样);第二步:设置中断的优先级级别;第3步:启用NVIC的中断。