|
楼主 |
发表于 2011-3-3 11:16:38
|
显示全部楼层
回复【1楼】hubertboy
-----------------------------------------------------------------------
中断期间,不执行其它中断。但是,若有其它中断请求,标志寄存器会不会被重新?
比如 TCCB定时满,硬件自动保存status,然后跳转至中断程序,执行中断。
这时TCCC定时器满,系统虽然不响应中断(DISI),但会不会自动保存status(因为此时TCCCIF=1),
这样就覆盖了TCCB进入中断时保存的status.
datasheet是这样说的
Before the interrupt subroutine is executed, the contents of ACC and the R3 and R4 registers will be saved by the hardware. If another interrupt occurs, the ACC, R3, and R4 will be replaced by the new interrupt. After the interrupt service routine is completed, the ACC, R3, and R4 registers are restored.
它没有说明,是在一次中断执行完后,还是执行期间硬件自动保存另一个中断的ACC,R3,and R4.
如果是执行完成后,系统状态不会出错;执行期间,会出错 |
|