--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> --- In lpc2000@yahoogroups.com, "mgiaco82" <mgiaco82@> wrote:
> >
> > I found this on the Page from Rowley.
> >
> > >>I'm trying to use vectored interrupts on the LPC2000. I've
> > programmed >>up the VIC but when the interrupt occurs the
program
> > jumps to >>the "irq_handler" label/function, not the ISR I have
> > configured using >>the VIC.
> >
> > >>How do I make the LPC2000 jump to my vectored ISR when the
> > interrupt >>occurs?
> >
> > Answer:
> >
> > You need to have the instruction "ldr pc, [pc, #-0xFF0]" located
at
> > the IRQ exception vector for vectored interrupts to work.
> >
> > To do this make sure you have the preprocessor definition
> > VECTORED_IRQ_INTERRUPTS defined when you compile the
> > Philips_LPC210X_Startup.s file.
> >
> > This mean i have to define anything before i can use the vic?
> > Can anybody explain pleas.
> >
> > thanks mathias
> >
>
> Yes, you have to do 'something' to alter the way in which the
startup
> file is assembled. Look at the Philips_LPC????_Startup.s file.
> Somewhere (maybe around line 86) you will find:
>
> #ifdef VECTORED_IRQ_INTERRUPTS
> .word 0xB9205F84 /* boot loader checksum */
> ldr pc, [pc, #-0xFF0] /* irq handler */
> #else
> .word 0xB8A06F60 /* boot loader checksum */
> ldr pc, [pc, #irq_handler_address - . - 8] /* irq handler */
> #endif
>
> One way to get VECTORED_IRQ_INTERRUPTS defined is to put, at the
top
> of the .S file:
>
> #define VECTORED_IRQ_INTERRUPTS
>
> Maybe put that just before:
> .section .vectors, "ax"
>
> If you do it that way, you will want to import the .s file to the
> specific project rather than linking to a modified master copy.
Right
> click on the file name in the Project Explorer dialog and select
> Import. Put the copy with the other source files for the project.
>
> There is probably a much better way to do this. At the moment, I
> can't find it.
>
> Richard
>
Hallo Richard, thanks for the message. Pleas can you give me a
detailed description of that. I don't see the point.
When I use the sample code from rowley for the timer irq it works.
But with der uart code, i have ported, it doesn´t work.
thanks,
mathias