ISR for timer1 in cc2430

Thread Starter

hazzman

Joined Dec 17, 2007
13
Hi people,

Started doing interrupt programming for my cc2430 project, and i think i've done all the config stuff with the timer1 like shown below and in my ioCC2430.h file the following interrupt vector is associated with Timer1:

Rich (BB code):
#define  T1_VECTOR  VECT(9,0x4B )   /*  Timer 1 (16-bit)Capt./Compare/Overfl */
so my main code is like:
Rich (BB code):
void main()
{
  T1CTL = 0x0E;   /*  tick_freq/128 -> 32M/128, modulo: 0x0000-> T1CC0*/
  T1CCTL0 = 0x44; /*  set output on compare, compare mode, no capture */
  T1CC0H = 0xEA;
  T1CC0L = 0x60;    /* compare 60,000 for example */

OVFIM =1; /* Timer 1 Overflow Interrupt Mask   */
T1IE = 1; /* Timer 1 Interrupt Enable  */
}

SO WHAT'S THE INTERRUPT SERVICE ROUTINE when the interrupt occurs?

I couldn't find it anywhere!
p.s. i'm using IAR Workbench
 

Thread Starter

hazzman

Joined Dec 17, 2007
13
sorry slight mis-understanding here....

I know i have to write my own ISR here for timer1, what i meant was:

What format does the ISR have to be?
e.g. I have seen this somewhere...

Rich (BB code):
void timer1_isr(void) interrupt #no.
{

}
I've tried this format and it doesn't seem to work.

What i also meant from the post is that i could not deduce what format the ISR function format had to be from the given header file (io2430.h) for IAR Workbench.
 

nanovate

Joined May 7, 2007
666
This is a compiler specific question:

IAR uses something like this I believe --> __interrupt void Timer1_ISR (void)

Double check their documentation though....
 
Top