You must be asked questions about ISR in every firmware or embedded system interview!
Interrupt Service Routine
- http://book.opensourceproject.org.cn/embedded/oreillyembed/opensource/0596009836/id-i_0596009836_chp_8_sect_3.html
- A single ISR (single interrupt) may be triggered by multiple source, then the ISR must include a condition test to determine which source causes this interrupt. Moreover, if multiple source trigger the interrupt at the same time, the ISR must detect it, or it will result in interrupt missing.
Difference between ISR and normal function
1) ISR has no parameter
2) ISR has no return value
3) ISR is asynchronous to instruction flow
4) ISR is triggered by hardware event
5) ISR can't call blocking function or non-reentrant function, such as printf()
6) ISR should be as short as possible, shouldn't call function which require long time to execute, such as printf(), floating point function…
7) ISR can't be blocked, can't wait on semephor, but can signal
2) ISR has no return value
3) ISR is asynchronous to instruction flow
4) ISR is triggered by hardware event
5) ISR can't call blocking function or non-reentrant function, such as printf()
6) ISR should be as short as possible, shouldn't call function which require long time to execute, such as printf(), floating point function…
7) ISR can't be blocked, can't wait on semephor, but can signal
Debugging ISR
http://www.ganssle.com/articles/dbg-isr1.htm — ISR debugging 1
http://www.ganssle.com/articles/dbg-isr2.htm — ISR debugging 2
http://www.ganssle.com/articles/dbg-isr2.htm — ISR debugging 2
沒有留言:
張貼留言