Question about interrupt functionality

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Question about interrupt functionality

ソリューションへジャンプ
1,066件の閲覧回数
timmeversmeyer
Contributor I

In my program I use a interrupt function which is triggered by a timer. The interrupt function is as follows:

 

#pragma interrupt alignsp saveall asm void TI1_Interrupt(void) {   /* Reset interrupt request flag */   bfclr       #0x8000, X:0x00f007  //do some calculations...      RTI }  

 

At the beginning the Interrupt request flag is set back. Then some calculations are done. The timer is running very fast. It could possible be that the time overflows before the functions has ended.

 

So my question is: is it possible that the interrupt function is called again before the function has been executed to the end? Or does the interrupt controller wait until the function has been executed before the interrupt function is called again?

ラベル(1)
0 件の賞賛
1 解決策
808件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Dear Timm,

Pls refer to the section 9.3.2.1 Normal Interrupt Processing and section 9.3.1 Interrupt Priority Structure in the DSP56800ERM.PDF, when an interrupt occurs, before the DSP core enter ISR, the CCPL(I1/I0 bits in SR register) is raised to be one higher than the level of the current interrupt, in other words, in this way the same interrupt can not interrupt again. For your case, I suppose you set the timer interrupt as 1, when the DSP enters ISR of Timer, the I1/I0 is added by 1 and becomes 2 automatically until the core exit the ISR, which will mask the interrupt source with 1 or 0 priority, so the same Timer interrupt event can not interrupt before the core exits the ISR.

BR

XiangJun Rong

元の投稿で解決策を見る

0 件の賞賛
1 返信
809件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Dear Timm,

Pls refer to the section 9.3.2.1 Normal Interrupt Processing and section 9.3.1 Interrupt Priority Structure in the DSP56800ERM.PDF, when an interrupt occurs, before the DSP core enter ISR, the CCPL(I1/I0 bits in SR register) is raised to be one higher than the level of the current interrupt, in other words, in this way the same interrupt can not interrupt again. For your case, I suppose you set the timer interrupt as 1, when the DSP enters ISR of Timer, the I1/I0 is added by 1 and becomes 2 automatically until the core exit the ISR, which will mask the interrupt source with 1 or 0 priority, so the same Timer interrupt event can not interrupt before the core exits the ISR.

BR

XiangJun Rong

0 件の賞賛