Real time interrupt problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Real time interrupt problem

Jump to solution
666 Views
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?

Labels (1)
Tags (1)
0 Kudos
1 Solution
434 Views
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?

View solution in original post

0 Kudos
2 Replies
435 Views
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 Kudos
434 Views
kayji
Contributor I

**bleep**.. i forgot that

 

thank you so much

0 Kudos