Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] External Interrupt

2004-06-07 by Robert Adsett

At 05:02 PM 6/7/04 +0000, you wrote:
>signal. I'm supposed to use it as an ExtInt...I did the following
>setup sequence:
>
>EXTMODE = SETBIT1;//Interrupção na borda de descida
>PINSEL0 |= 0x000000C0;//P0.3 ajustado para EINT1
>VICVectAddr0 =(unsigned long)ADISR; //redireciona vetor para função
>VICVectCntl0 = 0x20 | 15; //Seta vetor de interrupção para INT1
>VICIntEnable = SETBIT15; //Habilita interrupção INT1
>
>And put the function prototipe:
>
>void ADISR (void) __attribute__ ((interrupt));
>
>I have the rdy signal periodically but the ISR is not called...Did I
>forget
>something?

It doesn't look like you set up the actual interrupt vector anywhere.  You 
have to set up the base level interrupt routine which reads the interrupt 
vector peripheral to get the actual vector.  I believe there is an example 
in the files section.

On a personal preference note, I don't trust compilers to get interrupt 
prologues and epilogues right (been there, been bit multiple times).  I 
always do my own in assembly and if the service routine is more than a few 
instructions I can use a more or less plan vanilla C function to do the 
heavy lifting.

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

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.