Re: 再請教中斷的問題,關於中斷優先權
|
||||
---|---|---|---|---|
高級會員
|
兩層中斷的使用尚須留意低優先權中斷處理時,有可能被高優先權中斷程式中斷,故須留意中斷程式中所呼叫的副程式及參數是否相沖。
另也要考慮stack overflow的問題。FYR
發表於: 2008/1/23 11:43
|
|||
|
Re: 再請教中斷的問題,關於中斷優先權
|
||||
---|---|---|---|---|
新會員
|
剛剛問到答案,自問自答一下,
一個位置只能設一個中斷的程式, 所以我問的問題要修改成 org 0x0008 bra TIME_int org 0x0018 bra ALL 才是正確可行的! 然後把CAN的接收中斷和ADC接收中斷 打開並設為低優先權 這樣只要其中一個中斷被觸發 就會進到ALL這個程式中 進到ALL之後再去判斷說是哪個中斷被觸發 然後再對應要作的動作即可 就是這樣
發表於: 2008/1/22 16:31
|
|||
|
再請教中斷的問題,關於中斷優先權
|
||||
---|---|---|---|---|
新會員
|
不好意思,我又來問問題了!!
請問一下當我在寫中斷向量的時候 如果在0x0018h中設置兩組中斷向量不知道行不行?? EX: org 0x0008 bra TIME_int org 0x0018 bra CAN_int org 0x0018 bra ADC_int 又,如果可以的話,那處理的順序是如何? 是看誰的中斷條件先發生還是其他?? 以上 非常感謝
發表於: 2008/1/22 15:59
|
|||
|