螺栓螺母,
空ISR不需要像nop那样多的时钟周期。
STM8 CPU编程手册显示了服务ISR时会发生什么:
在获取ISR中断向量之前,STM8内核将PCL,PCH,PCE,Y,X,A和CC寄存器压入堆栈。这需要9个时钟周期。
如果您的ISR为空,即它仅包含在IRET中,则需要另外9个时钟周期来恢复这些寄存器。
EtaPhi
以上来自于谷歌翻译
以下为原文
Boltnut,
an empty ISR doesn't takes as much clock cycles as a nop.
The STM8 CPU Programming Manual shows what happens when an ISR is serviced:
the STM8 core pushes PCL, PCH, PCE, Y, X, A and CC registers onto the stack before fetching the ISR interrupt vector. This takes 9 clock cycles.
If your ISR is empty, i.e. it consists only in an IRET, another 9 clock cycles are needed to restore those registers.
EtaPhi
螺栓螺母,
空ISR不需要像nop那样多的时钟周期。
STM8 CPU编程手册显示了服务ISR时会发生什么:
在获取ISR中断向量之前,STM8内核将PCL,PCH,PCE,Y,X,A和CC寄存器压入堆栈。这需要9个时钟周期。
如果您的ISR为空,即它仅包含在IRET中,则需要另外9个时钟周期来恢复这些寄存器。
EtaPhi
以上来自于谷歌翻译
以下为原文
Boltnut,
an empty ISR doesn't takes as much clock cycles as a nop.
The STM8 CPU Programming Manual shows what happens when an ISR is serviced:
the STM8 core pushes PCL, PCH, PCE, Y, X, A and CC registers onto the stack before fetching the ISR interrupt vector. This takes 9 clock cycles.
If your ISR is empty, i.e. it consists only in an IRET, another 9 clock cycles are needed to restore those registers.
EtaPhi
举报