Yahoo Groups archive

Lpc2000

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

Message

Re: EINT0 on LPC2106

2005-05-09 by frumbub

--- In lpc2000@yahoogroups.com, "frumbub" <j_lilje@h...> wrote:
> Hello
> 
> I am having problems with the EINT0 interrupt.
> I have searched the posts and tried all suggested sollutions, but my
> problem persists.
> 
> The problem is that the system stays in the ISR like in an infinite
loop.
> 
> Code:
> void vRING_ISR( void )
> {
> 	vParTestToggleLED( 0 );
> 	VICVectAddr = ringCLEAR_VIC_INTERRUPT;
> }
> And thats it... the vParTestToggleLED( 0 ) function just toggles a led
> one time, that is verified, but when EINT0 is triggered if flashes
> endlessly and the other processes are blocked.
> 
> The EINT0 setp code:
> 
> VICIntSelect &= ~( RING_VIC_CHANNEL_BIT );
> VICIntEnable |= RING_VIC_CHANNEL_BIT;
> VICVectAddr2 = ( portLONG ) vRING_ISR;
> VICVectCntl2 = RING_VIC_ENABLE | RING_VIC_CHANNEL;
> 
> /* Enable EINT0 interrupt. */
> PCB_PINSEL1 |= EINT0_ENABLE;
> 
> Please help me out...

Forgot these...
/* Constants to setup and access the VIC. */
#define ringCLEAR_VIC_INTERRUPT	( ( unsigned portLONG ) 0 )
#define RING_VIC_CHANNEL	( ( unsigned portLONG ) 0x0E )
#define RING_VIC_CHANNEL_BIT	( ( unsigned portLONG ) 0x4000 )
#define RING_VIC_ENABLE		( ( unsigned portLONG ) 0x20 )
#define EINT0_ENABLE		( ( unsigned portLONG ) 0x01 )
#define ringCLEAR_VIC_INTERRUPT	( ( unsigned portLONG ) 0 )

Corrected the function name, is vRING_ISR and nothing else!

Thanks in advance..

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.