Interrupt problem

OP Guest #1671216
Rate this post
• ▲ useful
▼ not useful
Hi, Can someone help me please. I'm new to both ARM's and WinARM. I have 
a board with an LPC2368 which I have been able to write simple interrupt 
routines for EINT0, and timers 0 and 1, using the Keil evaluation 
software. I'm now using WInARM with Eclipse (Galileo) and cannot get the 
interrupts to work. I have the makefile set to NO THUMB and include both 
startup.s and swi_handler.s.
I notice when I build the project I get the following message although 
it seems to create both the hex and bin files

Creating Extended Listing: main.lss
arm-elf-objdump -h -S -C main.elf > main.lss
/usr/bin/sh: /c/winarm/bin/arm-elf-objdump: Invalid argument
make: *** [main.lss] Error 126

If I complie again it compiles with no errors.

For brevity I've stripped out some of the comments, extint.c is

void _attribute_ ((interrupt("IRQ"))) EINT0_Handler (void);

volatile DWORD eint0_counter=0;

 void EINT0_Handler (void)
 {
   EXTINT = EINT0;    /* clear interrupt */

   IENABLE;        /* handles nested interrupt */
   eint0_counter++;
   if ( eint0_counter & 0x01 )  /* alternate the LED display */
   {
   FIO3SET = 0x04000000;  /* LED(P3[25]) = OFF */
   }
   else
   {
   FIO3CLR = 0x04000000;  /* LED(P3[25]) = ON */
   }
   IDISABLE;
   VICVectAddr = 0;    /* Acknowledge Interrupt */
 }

 /*****************************************************************/
 DWORD EINTInit( void )
 {
   PINSEL4 = 0x00100000;  /* set P2.10 as EINT0 and*/

   FIO3CLR = 0x02000000; // LED(P3[25]) = ON

   IO2_INT_EN_F = 0x200;  /* Port2.10 is falling edge. */
   EXTMODE = EINT0_EDGE;  /* INT0 edge trigger */
   EXTPOLAR = 0;      /* INT0 is falling edge by default */

   if ( install_irq(EINT0_INT,(void *)EINT0_Handler,HIGHEST_PRIORITY 
)==FALSE)
   {
   return (FALSE);
   }
   return( TRUE );
 }

 Many thanks

 Alastair
Attached files:

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.