AnsweredAssumed Answered

Interrupt Vector Question - Mod Help Please

Question asked by Ryan Richardson on Aug 31, 2010
Latest reply on Sep 1, 2010 by kef

Hello,

   Currently using the HCS12C128 and Code Warrior

 

I have a question regarding interrupt vectors.

 

As a quick set up I have the following program folder/file set up

Sources

    -isr_vectors.c

    -main.c

    -datapage.c

 

Includes

    -derivate.h

    -MC9S12C128.h

 

Project Settings

    -Startup Code

        =Start12.c

    -Linker Files

        =burner.bbl

        =Project.prm

        =Project.map

 

The ISR_vectors file is the one present in the Code Warrior examples.

Lets say I want to use my RTI interrupt to be initialized as follows above my main call in my main.c file

 

#pragma CODE_SEG  __NEAR_SEG NON_BANKED

interrupt void RTI_ISR(void) {

 

//Do something

 

}

 

#pragma CODE_SEG DEFAULT

 

This portion declares my function RTI_ISR as an interrupt routine in nearby memory.

 

My question is as follows :

If in my ISR_VECTORS.C file I change Vector 7's(RTI INTERRUPT VECTOR) name from UnimplementedISR to

my function name and include the prototype function at the start of my ISR_VECTORS.C file, my Interrupt should be correctly implemented ?

 

using the declaration below extern void near _Startup(void) at the top of the ISR_VECTORS.h file

 

extern void near RTI_ISR(void);

 

OR

 

Do I need to also go into my Projectt.prm file and add something to the vector table at the bottom of that file ?

 

Thanks for your help.

Outcomes