kejian2000 发表于 2009-10-13 16:52:14

PSoC中断嵌套问题

一般来说
当高优先级中断正在执行时,低优先级的中断是不响应的

请问,PSoC是不是也一样啊?

kejian2000 发表于 2009-10-13 19:18:26

leon101010 发表于 2009-10-15 16:53:20

不同.
只要进入中断,就会自动关闭全局中断允许,不再响应任何中断.直到reti指令自动允许全局中断.
你如果要中断嵌套,需要手动操作允许全局中断.

kejian2000 发表于 2009-10-15 16:59:12

我查了官方网站,相同的
Question:
Why do I have to re-enable global interrupts?

Response:
Global nterrupts are disabled in Interrupt Service Routines (ISRs) by default. Re-enabling the global interrupts inside an ISR allows the next pending interrupt to be serviced while inside the ISR that enabled global interrupts. If the pending interrupt is lower priority than the one that enabled global interrupts, it will still be serviced.

Note: If you enable global interrupts inside an ISR that posts interrupts faster than they can be serviced, you may overflow your stack by constantly entering an ISR without exiting it.

leon101010 发表于 2009-10-15 17:18:24

误会了.
你提问"当高优先级中断正在执行时,低优先级的中断是不响应的",我的理解:潜台词是更高优先级能响应.
PSOC是任何中断都不再响应,注意是任何中断,即使更高优先级的中断.

kejian2000 发表于 2009-10-16 08:18:54

在中断里打开全局中断就可以响应更高优先级了

blueblue 发表于 2010-3-2 20:18:36

意思是不是说PSOC没有中断嵌套,即当低优先级中断正在执行时,此时若有个高优先级的中断产生,CPU是不会跳转去完成高优先级的中断.
页: [1]
查看完整版本: PSoC中断嵌套问题