Real time interrupt problem

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

Real time interrupt problem

ソリューションへジャンプ
368件の閲覧回数
kayji
Contributor I

hello.

Recently I'm making a embedded module using a real time interrupt.

Problem is if I call a real time service routine, main function doesn't work any more. I mean, the code after the code which can enable a real time interrupt  can't be executed.

 

This is my code.

 

//// real time service routine ///

#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt void RTI_ISR(void){          
  main_routine();                     
 }

 

// function//

void main_routine(void) { functions();}


// main function //

void main{

 

some codes;

EnableInterrupts;

codes that don't work any more;

 

}

 

I think routine is working well but only that codes have a trouble. what's wrong with my code?

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
136件の閲覧回数
rocco
Senior Contributor II

Hi Kayji,

 

I suspect that you are not clearing the real-time interrupt-flag, and therefore executing the ISR repeatably.

 

Are you writing a one to RTIACK?

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
137件の閲覧回数
rocco
Senior Contributor II

Hi Kayji,

 

I suspect that you are not clearing the real-time interrupt-flag, and therefore executing the ISR repeatably.

 

Are you writing a one to RTIACK?

0 件の賞賛
136件の閲覧回数
kayji
Contributor I

**bleep**.. i forgot that

 

thank you so much

0 件の賞賛