AnsweredAssumed Answered

RSIs1() in Processor Expert

Question asked by Aaron Lee on Apr 11, 2019
Latest reply on Apr 23, 2019 by Diana Batrlova

Hi,

We are using S12ZVCA & Processor Expert(CodeWarrior 11.0.1). And we are setting RSIs1 to trigger a ISR per 1ms.

How to increase variable "i" per 1ms in main()?

 

main()

{

   uint16_t   i;

   i++;         // when ISR(RTIs1_Interrupt) is trigger

}

 

RSIs1.c (Manage by Processor Expert)

/*
** ===================================================================
** Method : RTIs1_Interrupt (component RTIshared)
**
** Description :
** The method services the interrupt of the selected peripheral(s)
** and eventually invokes the components event(s).
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
#pragma CODE_SEG __NEAR_SEG NON_BANKED
ISR(RTIs1_Interrupt)
{
TIM1TFLG1 = 0x01U; /* Reset interrupt request flag */
TIM1TC0 += 0xFA00U; /* Add value corresponding with period */

/* Warning: This component is not used by any other component! */

}

#pragma CODE_SEG RTIs1_CODE

/* END RTIs1. */

I have been add code "i++;" to ISR(RTIs1_Interrupt). But "i++;" disappear when i regenerate the PROCESSOR EXPERT CODE.

Do you have any recommend?

 

Best Regards,

Aaron

Outcomes