Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] IRQ - I don't know what me do. HELP!!! PLZ

2005-07-25 by Mike Nelson

Alex:

Do not modify the default IRQ handler as you have
shown below.  The default IRQ handler reads the
vector from the Vectored Interrupt Controller of
the ARM processor (VIC) to get the vector to your
UART1 interrupt service function.

You need to study how the VIC works and modify
its registers according to your needs.

Regards:

Mike Nelson

--- alexmotin <alexmotin@...> 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.
> 
> 
> 
> 
> 



		
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.