Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem executing program even after successfully burning.

Status
Not open for further replies.

kpax_7999

Newbie level 3
Newbie level 3
Joined
Jul 1, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,315
Hello Friends,

I have developed a LPC2138 based prototype board and am using uVision Keil to write and compile the code and Flash Magic to burn it.

Now whats happening is that flash magic is able to detect the chip as it shows the device id and boot-loader version and is able to program it successfully which says finished in the end but, once the program is burned nothing happens. The program is quite simple just to set and clear a pin, the kiel compiler also gives me a success status and i see the pin getting set and cleared in the debug mode. But this is not happening realtime, my concern is about a few points on the hardware level, i have not pulled up the #rst and BSEL(P0.14) pins and my xtal is of 14.7456 MHz with 22pF load caps, can these be the problem or is their any other kind of configuration that i need to perform in keil / flash magic.

Looking forward to any help.

Regards
Kpax
 

yes ....P0.14 should be made high otherwise the program will not execute.... when you program the controller P0.14 should be low.......

but also post the code.. you need lot of delay to see output in hardware....
 

Hello ckshivaram,

thanks for the response, following is the code that you asked for, also i just wanted to ask that if i directly jump the BSEL and #RST pin to 3.3V without using a 10K res, will it be ok? this is because my PCB is already done so in can use connectors to directly jump and see if it works. Also do i need to change 22pF caps to 38pF as specified in UM or is it ok with 22pF, also i would like to stress that the chip gets successfully detected and programmed by flash magic, its just not executing the program code. So i suppose it enters the boot mode but after that *** knows :)

#include <lpc213x.h>
//#include "uart.h"

int main (void)
{
volatile unsigned int i,j;

//PLLCON = 0x03;
//PLLCFG = 0x22;

PINSEL1 &= ~(1<<23);
PINSEL1 &= ~(1<<22);

IODIR0 |= (1<<27);

while(1)
{
IOCLR0 |= (1<<27);
for(i=0;i<100;i++)
{
for(j=0;j<1000;j++);
}

IOSET0 |= (1<<27);

for(i=0;i<100;i++)
{
for(j=0;j<1000;j++);
}
}
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top