Derek Francis

S12X RTI Interrupt vector, linker fails

Discussion created by Derek Francis on Jan 13, 2011
Latest reply on Jan 13, 2011 by kef

Hello All,


I am using CodeWarrior Vers 5.7.0. I am trying to initialize the RTI vector in my .prm file and keep being told that the following code is "under or overflow of vector value". I am new to the s12x and am used to the old HC12 interrupt vector table scheme. Am I initializing this vector to the proper address ( I got 0xFFF0 from the .header file produced by codewarrior)?




As well, here is my C code for init and ISR of the RTI.



interrupt void RTIHndlr(void) {  if (count >= 9) {    ATD_In /= count;    count = 1;    ATD_Avg = ATD_In;    ATD_In = 0x00;      } else {    while((ATD0STAT0 & 0x8000) == 0x8000) {}  ATD_In += ATD0DR0H;       } count++;  CRGFLG = 0x80;}void RTIinit(void) { count = 1;    RTICTL = 0x87;   CRGFLG = 0x80;   asm cli;}

Thank you all so much (P.S. this is for an ATD application that averages a sample every predetermined time cycle)