Problem in while (1) Code for Philips LPC 2148

Hi Guys,

I have atlast downloaded the code into the RAM of LPC 2148. When in debug mode, Iam not able to emulate a while(1) loop, but first loop goes fine and the LED blinks once, but it does not enter the second loop. What could be the reason. The code is for blinking a LED.

#include <iolpc2148.h>

#include <inarm.h>

unsigned int i;

void Delay (void)

{

for (i=0;i<60000;i++);

}

void main(void)

{

PINSEL0 = 0x00000000;

IO0DIR = 0x00000400;

while(1)

{

IO0SET = 0x00000400;

Delay();

IO0CLR = 0x00000400;

Delay();

}

}

what compiler?

what optimization settings?

don’t use high optimization if you want to debug

tsvetan

Hi,

Iam using IAR Compiler and I have kept the size and speed optimizations to ‘none’.