Yahoo Groups archive

Lpc2000

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

Message

IRQ - I don't know what me do. HELP!!! PLZ

2005-07-24 by alexmotin

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.

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.