Hi Vivek,
I can tell you how I got working ISR for Kinetis, but I guess it depends on the toolchain you're using.
With IAR Embedded Workbench, I just declare the ISR like a normal routine:
void lptmr_isr(void)
{
lp_seconds++;
LPTMR0_CSR |= LPTMR_CSR_TCF_MASK; // write 1 to TCF to clear the LPT timer compare flag
}
In the example I use LPTMR for 1 second interrupt; I have a file named vectors.c taken from the sample code. It declares an array and forces it to be allocated in the intvec segment:
#pragma location = ".intvec"
const vector_entry __vector_table[] = //@ ".intvec" =
{
VECTOR_000, /* Initial SP */
VECTOR_001, /* Initial PC */
VECTOR_002,
VECTOR_003,
...
The entries VECTOR_*** are defined in vectors.h
| #define VECTOR_000 | (pointer*)__BOOT_STACK_ADDRESS |
| #define VECTOR_001 | __startup |
| #define VECTOR_002 | default_isr | |
you just have to substitue the right entry with your ISR. I'm working this way on KL15, KL25, K70 families.
Regards
Marco