Yahoo Groups archive

Lpc2000

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

Message

Re: External Interrupt

2004-06-07 by Rodrigo Cesar da Silva Martins

I'm using  the BlinkIRQ startup example. One line of the file is:

 LDR     PC, [PC, #-0x0FF0]     /* Vector from VicVectAddr */

this is the address 0x18...Well I think that, when a interrupt 
occurs, my program goes to address 0x18, which redirects to the 
address loaded in the VICVectAddr... In the Blink example just the 
VIC and TIMER0 register are adjusted...I'm a begginer with the ARM 
Arquitecture, and I don't have time now to learn ARM or THUMB 
Assembly, maybe after this project I can study more, now I need to 
solve all problems ACAP ( As C As Possible ) :-)

Do I need to change something in startup.s file?

There's an example with 2 interrupt sources in the internet? I need 
to know how to work with interrupt priorities...Not now but soon...



--- In lpc2000@yahoogroups.com, Robert Adsett <subscriptions@a...> 
wrote:
> 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.