--- In lpc2000@yahoogroups.com, "alexmotin" <alexmotin@y...> wrote:
> Hello.
>
> I have a big problem!
>
> I use IAR 4.10B LPC2119 and i want to use IRQ UART1
> I did it so:
>
>
>
> InstallHandler((unsigned int *)0x18, (unsigned int)
> IRQ_ISR_Handler);
> VICIntEnable |= 0x80;
> U1IER = 0x01;
> __enable_interrupt();
>
> where
>
> unsigned int InstallHandler(unsigned int *vector, unsigned int
> function)
> {
> unsigned int vec, old_vec;
>
> vec = ((function - (unsigned int)vector - 8) >> 2);
>
> old_vec = *vector;
> vec |= 0xEA000000; /* add opcode for B instruction */
> *vector = vec;
>
> old_vec &= ~0xEA000000;
> old_vec = ( old_vec << 2 ) + (unsigned int)vector + 8;
>
> return(old_vec);
> }
>
>
>
> I have try a lot of kind to do it. But ARM always jump to 0x14 when
> happend interrupt.
>
> If anybody know what to do, tell me please.
>
> It will be very big hppy for me? becouase i have try to do it ll
> week.
Had the same issue a little while ago (new at this ARM stuff also).
The interrupt handler install function is only if you are running
your interrupt vector table from RAM. So either adjust your MEMMAP
to reflect this or run the vector table from Flash. If running from
flash just place the following line before the interrupt service
routine:
#pragma vector = 0x18
Has worked for me so far although I am having other issues with IAR
(or setup).Message
Re: IRQ - I don't know what me do. HELP!!! PLZ
2005-07-25 by genie_23432
Attachments
- No local attachments were found for this message.