EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Keil and LPC 2103 problems

Started by victor serov May 14, 2006
Hi to all.
I have a board from Olimex with LPC-2103.
My first problem - I can't download program to the
board with ULINK and JTAG. I receive the message -
"Cannot load flash programming algorithm" I use
algorithm "LPC2000 IAP2 32kb Flash". If I use Philips
FLASH utility via RS232 all works fine. And JTAG
download works correct with other ARMs (STR7).

And second and bigger problem - For external
interrupt0 I write the folowing:

PINSEL1 = 0x1;//Set P0.16 to EXT Interrupt
EXTMODE |= 1;// Edge
EXTPOLAR |= 1;// Rising
VICIntSelect &= ~0x4000;
VICIntEnable = 0x4000;
VICVectCntl1 = 0x2E;
VICVectAddr1 = (unsigned long)EXT0_isr;

It should give me rising edge interrupt. But I receive
FALLING edge. It seems like EXTPOLAR register doesn't
matter. Whatever I put in it - I always receive
falling edge interrupt. Is it a bug?
Thanks.

__________________________________________________

An Engineer's Guide to the LPC2100 Series

Problems is fixed. Sorry, I found these solutions
accidentally (after 2 days stuck).
First, with flash programming - I need to reduce JTAG
frequency to 100 kHz in Keil setup.
Second, with polarity - I need to reset interrupt
flag:

while(EXTINT & 1){
EXTINT |= 1;
}

after setup EXTMODE and EXTPOLAR
Sorry and thanks

--- victor serov wrote:

> Hi to all.
> I have a board from Olimex with LPC-2103.
> My first problem - I can't download program to the
> board with ULINK and JTAG. I receive the message -
> "Cannot load flash programming algorithm" I use
> algorithm "LPC2000 IAP2 32kb Flash". If I use
> Philips
> FLASH utility via RS232 all works fine. And JTAG
> download works correct with other ARMs (STR7).
>
> And second and bigger problem - For external
> interrupt0 I write the folowing:
>
> PINSEL1 = 0x1;//Set P0.16 to EXT Interrupt
> EXTMODE |= 1;// Edge
> EXTPOLAR |= 1;// Rising
> VICIntSelect &= ~0x4000;
> VICIntEnable = 0x4000;
> VICVectCntl1 = 0x2E;
> VICVectAddr1 = (unsigned long)EXT0_isr;
>
> It should give me rising edge interrupt. But I
> receive
> FALLING edge. It seems like EXTPOLAR register
> doesn't
> matter. Whatever I put in it - I always receive
> falling edge interrupt. Is it a bug?
> Thanks.
>
> __________________________________________________
>
>
__________________________________________________


The 2024 Embedded Online Conference