AnsweredAssumed Answered

About interrupt system in ADuC 7026

Question asked by seelan on Mar 5, 2012
Latest reply on Aug 8, 2012 by wallman16

dear sir,

             i am working on Aduc 7026. i have a doubt on interrupt system. i am using Keil micro vision 4 for c programming. when i  run the below program i got an error like.........

 

Build target 'Target 1'

assembling ADuC702x.s...

compiling t.c...

linking...

t.axf: Error: L6218E: Undefined symbol DAbt_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol FIQ_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol IRQ_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol PAbt_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol SWI_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol Undef_Handler (referred from aduc702x.o).

t.axf: Error: L6218E: Undefined symbol IRQ (referred from t.o).

Target not created


and i got an same error whenever i run the program which has an interrupt service routine. i  don't know what to do? please help me. i want to use this timer interrupt  in enabling/disabling of PWM and ADC. if you can plz send the timer pgm with backup files.

 

program:-

#include<ADuC7026.h>

void My_IRQ_Function(void);

int main (void)  {

           T1LD = 0x20000;                                                            // Counter Value

          T1CON = 0xC4;                                                                 // Enabled,Periodic,Binary and CLK/16

             IRQ = My_IRQ_Function;                                        // Specify Interrupt Service Rountine

          IRQEN = GP_TIMER_BIT;                                        // Enable Timer1 IRQ

          GP4DAT = 0x04000000;                                             // P4.2 configured as an output. LED is turned on

          while (1)

          {           }

}

void My_IRQ_Function()

{

          if ((IRQSTA & GP_TIMER_BIT) != 0)                // Timer1 IRQ?

          {

                    GP4DAT ^= 0x00040000;                                        // Complement P4.2

                    T1CLRI = 0;                                                                      // Clear Timer IRQ

          }

          return ;

}

Outcomes