Real time interrupt problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Real time interrupt problem

跳至解决方案
681 次查看
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 解答
449 次查看
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 回复数
450 次查看
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 项奖励
449 次查看
kayji
Contributor I

**bleep**.. i forgot that

 

thank you so much

0 项奖励