Hi,
I have been facing the problem with the lpc2148 development board from the day i bought it. There is BOOT button & RESET button. when i start to dump the program in to it, the flash magic showed ''Failed to read the device signature". so by pressing the boot button continously & i start dumping the code, then only flash magic shows me ''Finished". I have dumped serial communication program. the code is what ever the letters that we press from key board that must appear on the hyper terminal of the pc. this is working perfectly. below code is the serial communication code. The main problem is if i dump another code like led blinking, then also the below serial communication code is working if i open the hyper terminal & type the letters then they appear on the hyper terminal of the pc. i.e., the actual code is not working(what ever the code i dumped, the below serial communication code is working instead of the dumped codes). please solve my problem. i have exam on the arm. please solve. i post the serial communication code, led blinking code & images of the board. can anybody please solve my problem.
/*serial communication programm*//*WHAT EVER THE CHARACTER TYPED FROM THE KEYBOARD OF PC THAT GOES IN TO LPC2129 AND FROM LPC2129,IT DISPLAY ON THE HYPERTERMINAL*/#include<LPC21xx.h>void main(void){unsignedchar ch;
PINSEL0=0X00000005;/*TO MAKE THE PORT PINS0.0&0.1 AS TxD&RxD*/
U0LCR=0X83;/*TO SELECT THE WORD LENGTH AS 8BIT & MAKE THE LATCH ACCESS BIT HIGH TO CHANGE THE BAUD RATE*/
U0DLM=0;/*SET DIVISOR LATCH MSB REGISTER AS 0*/
U0DLL=20;/*SET THE DIVISOR LATCH LSB REGISTER AS 20 TO GET 9600 BAUD RATE & CCLK@12MHZ*/
U0LCR=0X03;/*TO MAKE THE LATECH ACCESS BIT LOW*/while(1){while(!(U0LSR&0X01));/*WAIT UNTILE DATA IS RECIEVED*/
ch=U0RBR;/*PLACE THE RECIEVED DATA FROM RECIEVE BUFFER REGISTER IN A VARIABLE*/
U0THR=ch;/*PLACE THE RECIEVED DATA IN TO THE TRANSMIT BUFFER REGISTER*/while(!(U0LSR&0X20));/*WAIT UNTIL DATA IS TRANSMITTED*/}}/*LED PROGRAMM*//*ALTERNATE BLINKING OF AN LED*/#include<LPC21xx.h>#define LED 1<<1void delay(void);void main(void){
IODIR0=LED;/*MAKE PIN 0.1 AS OUTPUT*/while(1){
IOSET0=LED;/* SET THE PIN 0.1*/
delay();/*CALLING THE DELAY FUNCTION*/
IOCLR0=LED;/*CLEAR THE PIN 0.1*/
delay();/*CALLING THE DELAY FUNCTION*/}}void delay(void){unsignedint i;unsignedchar j=255;for(;j>0;j--)for(i=500;i>0;i--);}
I have already done what u said. but the same problem repeats again. if i dump for example led blinking problem then the led glows continously even i press the reset switch continoulsy.
You indicate the problem existed since you originally received the board, was the dev board shipped with the UART communications demo code already programmed or did you initially program it into the flash?
Do the board have a JTAG connector?
If so, do you know of anyone with a JTAG programmer/debugger to attempt to program the device without the resident boatloader and Flash Magic?
Also, can you upload the schematic of your dev board?
when i bought this development board, i did not get any C.Ds which contains demo codes. so initially i programed it in to flash. it don't have JTAG connector.