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.

[ARM] LPC 2148 development board problem

Status
Not open for further replies.

v.s.n.kumar

Member level 1
Joined
Dec 2, 2013
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
303
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.

Photo-0040.jpgPhoto-0041.jpgPhoto-0042.jpgPhoto-0043.jpg


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*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)
{
 unsigned char 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<<1
void 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)
{
 unsigned int i;
 unsigned char j=255;
  for( ;j>0;j--)
    for(i=500;i>0;i--);
}

 
Last edited by a moderator:

you should erase all flash while burning the code. means flash magic should look like as follows.
5104358900_1389267589.png


- - - Updated - - -

and u can tick verify after programming also to confirm the code is burned correctly.
 

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?


BigDog
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top