Forum: ARM programming with GCC/GNU tools how to handle multiple interrupts in GCC using LPC2138

Author: Ravindra (Guest)
Posted on:

Rate this post
0 useful
not useful
hi all,
can any body plz tell me how to handle more than one interrupts
in GCC .
single interrupts are working separately when I changed in startup.s
file like below:
# Exception Vectors
#  Mapped to Address 0.
#  Absolute addressing mode must be used.
#  Dummy Handlers are implemented as infinite loops which can be

Vectors:        LDR     PC, Reset_Addr
                LDR     PC, Undef_Addr
                LDR     PC, SWI_Addr
                LDR     PC, PAbt_Addr
                LDR     PC, DAbt_Addr
                NOP                            /* Reserved Vector */

    LDR     PC, IRQ_Addr
                LDR     PC, FIQ_Addr

Reset_Addr:     .word   Reset_Handler
Undef_Addr:     .word   Undef_Handler
SWI_Addr:       .word   SWI_Handler
PAbt_Addr:      .word   PAbt_Handler
DAbt_Addr:      .word   DAbt_Handler
                .word   0                      /* Reserved Address */

IRQ_Addr:       .word   uart0 /* uart0 is the service routine function
which I placed here  */
FIQ_Addr:  .word   FIQ_Handler

Undef_Handler:  B       Undef_Handler
SWI_Handler:    B       SWI_Handler
PAbt_Handler:   B       PAbt_Handler
DAbt_Handler:   B       DAbt_Handler

IRQ_Handler:    B      uart0  /* uart0 is the service routine function
which I placed here  */

FIQ_Handler:    B   FIQ_Handler
prototype defined is :
void uart0(void) _attribute_ ((interrupt ("IRQ")));
I hav alredy posted a mail earlier but not received any response yet.

now plz tell me how to handle multiple interrupts?

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
Please check the documents available from Philips (Manual, Section VIC)
and ARM (ARM7TDMI referece-manual, VIC "macrocell"). Either use an
instruction like ldr pc,[pc,#-0xFF0] at the "IRQ-position" of the
exception vectors or branch to a assembler-wrapper which may use the
VIC's vector-adress as branch address to an ISR. Various source-examples
available from the yahoo-group and in the WinARM examples-collection
should demonstrate the different approaches.

Martin Thomas


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.