LPC1114 Stopped working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1114 Stopped working

764 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Fri Jan 14 01:32:09 MST 2011
I am using an LPC1114. It was working well. I eventually changed a line in the programming, adding an output command to set a pin. Since then my computer does not pick up the board. I get the message:

"Connect to emulator or board: NXP LPC1100  No emulqtor or board available.  This could be because it is unpowered, unconnected or already in use."

I then did the hard reset by grounding P0_1 when asserting reset. The LED goes on so I think it is resetting. But still I get the same message when trying to connect. Is it possible that something blew out on the board? I can not think of anything else that can be wrong, as it was working fine previously.
0 Kudos
12 Replies

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Mar 11 06:37:25 MST 2011
So you have external hardware attached to PIO0_1 (printer AND push button). Is this hardware pulling PIO0_1 low on reset? If so, then this will explain why the debug tools cannot attach.

Regards,
CodeRedSupport
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Fri Mar 11 05:13:13 MST 2011

Quote: CodeRedSupport
So in other word, you have modified your board ;)


Guess that depends on you definition of modify hey..was thinking major changes.. :)


Quote: CodeRedSupport
You want to make sure that you are not intefering with pins used by the debug tools

PIO0_0 / Reset
PIO0_10 / SWCLK (which is also SCK0 - Serial clock for SPI0)
PIO1_3 / SWDIO

Also make sure that you are not holding PIO0_1 low



I do use PIO0_1 for a clock on my printer shift registers. I manually adjust the clock setting it high or low after asserting data pins for the shift register. This could be a reason for my problem, but then when I changed the workspace yesterday and used the sample program it should have recovered.

I do not use the other 3 (except 0_0 for reset, which is on a push-button, to reset, and 0_1 also on a push button, to allow hard reset) .........HANGON. So I use 0_1 for shift register clock and push-button for hard reset.
This should however not be a problem, as I only use the button to reset, other than that it clocks the shift registers.
I did set 0_1 to 0 as part of the main initialisation sequence. But again, the previous sample program should have reset everything. :confused:
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Fri Mar 11 01:45:57 MST 2011

Quote: CodeRedSupport
Sorry - your screenshot is illegible. ]


Attached is a new jpg that is a bit bigger..
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 10 07:24:07 MST 2011

Quote: Poenie
I followed the link below for debugging. I got to the first step:

[I]run one of the following commands, depending on you OS type [/I]
[LIST]
[*][B]bootLPCXpresso winusb[/B] [WinVista/[B]Win7[/B]]
[/LIST]
Here It already stopped because of not picking up the board (see attached).



Sorry - your screenshot is illegible. Please either crop the screenshot to show only the relevant text (so hopefully the forum software will compress the image less), or copy'n'past the text out of the DOS command line prompt directly into the thread.

[Try http://www.irfanview.com/ if you need a tool to help with grabbing and cropping screenshots.]
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 10 07:10:57 MST 2011

Quote: Poenie
I use an un-modified, stand-alone LPC board. I have soldered wires to some port/pins, which I connect to a prototype board. The prototype is a thermal printer, which will receive data from a POS system via SPI.



So in other word, you have modified your board ;)

You want to make sure that you are not intefering with pins used by the debug tools

PIO0_0 / Reset
PIO0_10 / SWCLK (which is also SCK0 - Serial clock for SPI0)
PIO1_3 / SWDIO

Also make sure that you are not holding PIO0_1 low, which will cause the MCU to always enter ISP mode on reset (which would stop debugging).

Regards,
CodeRedSupport
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Thu Mar 10 07:10:11 MST 2011
I followed the link below for debugging. I got to the first step:

[I]run one of the following commands, depending on you OS type [/I]
[LIST]
[*][B]bootLPCXpresso winusb[/B] [WinVista/[B]Win7[/B]]
[/LIST]Here It already stopped because of not picking up the board (see attached). I used a different USB cable this time. So maybe the board is not getting any power? Yet even if I connect the 5VIN pin to a 5V supply, it still does not pick up the board.
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Thu Mar 10 06:47:34 MST 2011
I created a new workspace.
Imported the examples
Built the systick example and programmed using FlashMagic - worked fine
Tried Debugging timer32, same problem. 57% then stops (I attached a screen shot).
One thing I forgot to mention, is that with FlashMagic I do not use the LPC-Link. I use a USB TTL232, which is connected to the RXD and TXD pins. So I use serial communication (which I think is the only way FlashMagic works) to program the flash directly.
I use an un-modified, stand-alone LPC board. I have soldered wires to some port/pins, which I connect to a prototype board. The prototype is a thermal printer, which will receive data from a POS system via SPI. Can't remember what I programmed when it stopped debugging propperly. I experienced the same problems at the beginning (due to faulty programming), but once I did the hard reset I could debug fine again. Normally you just over-write the (faulty) code with stable code.

I shall look into the instructions at the support link...Thanks all your trouble so far...
Will keep you informed of the results.
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Mar 09 01:56:22 MST 2011
OK. First of all let's try the following:

[LIST]
[*]Create a new, empty workspace using "Select File-> Switch workspace".
[*]Import the LPCXpresso1114.zip example using Quickstart Panel -> Import Example Projects...
[*]Build the examples and program systick_twinkle into flash using flash magic.
[*]Now try downloading the timer32 example into flash via the debugger.
[/LIST]
[Doing the above should avoid any problems with changes you may have made to, say, the CMSIS library project in your original workspace.]

Does the debug connection now work, or do you still stop at 57%?

If it still fails, try swapping out the usb cable for a different one. Also try using a different USB socket on your PC (and make sure the connection is direct and not through a hub).

Finally, if it still fails, please run through the instructions at:

http://support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics

and post us the output. Also tell us a little about your hardware. Is it an unmodified,  standalone LPCXpresso board, or have you made modifications to the  board, or do you have it mounted on a baseboard of some description?

Regards,
CodeRedSupport.
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Wed Mar 09 01:00:18 MST 2011
I reset the board again and tried programming the systick example. It still does not pick up the board and goes to 57% when debugging and says no emulator board available.
I copied the systick_twinkle program into my program, debugged via Flash Magic and it worked. That should mean that any wrong doing previously should be un-done. It works perfectly, but when I try debugging through Xpresso I still get the same error.
My theory is that since I have been re-programming it quite a lot, some component might have passed its life expectancy on the target board?

Will create new post for rest thanks..
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Mar 08 06:37:36 MST 2011

Quote: Poenie
I did view that page, which is why I mentioned the "hard reset by grounding P0_1 when asserting reset". I can reset the target, but can not debug via Xpresso.
I now installed Flash Magic, which works. That means I can no longer debug through the LPCXpresso program (Still does not pick up board, even when reset). I program in it, then debug through Flash Magic, which means I have to follow the above reset procedure every time. But at least it works.


So I suppose the question becomes "What were the changes you made to your code immediately before it stopped working via LPCXpresso IDE?"

And if you are programming the same code back into the board after resetting to ISP, then this will prevent you debugging again! Try downloading one of the supplied "led flash" examples into the board (without making any changes to it) and see if you can then connect via the debugger.

Two possibilities for code changes that might cause problems are that you have modified the clock settings in some way, or you have reconfigured the MCU pins such that the debug pins are being used for GPIO (for example  PIO0_10) and hence are not accessible to the debug tools.


Quote:

My problem now is to create a dynamic array. I created a struct:

Suggest you create a new thread. This question appears to have nothing to do with "[B]LPC1114 Stopped working", [/B]and hence you may well find that many other forum members who might help you will not spot your new question.

Regards,
CodeRedSupport
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Poenie on Tue Mar 08 06:17:31 MST 2011
I did view that page, which is why I mentioned the "hard reset by grounding P0_1 when asserting reset". I can reset the target, but can not debug via Xpresso.
I now installed Flash Magic, which works. That means I can no longer debug through the LPCXpresso program (Still does not pick up board, even when reset). I program in it, then debug through Flash Magic, which means I have to follow the above reset procedure every time. But at least it works.

My problem now is to create a dynamic array. I created a struct:

[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]struct[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] nodeType
{
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]info[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]struct[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] nodeType *[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]link[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]count[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
} ;

 
and directly below I declare the pointers:[/LEFT]
nodeType [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]__attribute__[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((__packed__))*first, *newNode, *last, *current;[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]The compiler kept complaining about "expected '=', ',' , ';' 'asm' or  '__attribute__' before '*'"[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]So I changed it to :[/SIZE]
[SIZE=2][/SIZE]
nodeType [B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]__attribute__[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((__packed__))*first, *newNode, *last, *current;[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Now I get:[/SIZE]
[SIZE=2]"expected ',' or ';' before '*'"[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]Not sure what [COLOR=#7f0055][B]__attribute__ [/B][/COLOR][SIZE=3][COLOR=#000000]does yet, but will do more reading. [/COLOR][/SIZE][/SIZE]

I tested the code in Visual Studio C++, where it worked well. It looks correct for C though..?

What I want to accomplish is to create a dynamic array to accept data packets from a master via SPI. Because I do not know the size untill actually receiving the 3rd byte, it should be dynamic, thus a linked list.
[SIZE=2][/SIZE]
[U][SIZE=2]
[/SIZE][/U]
0 Kudos

700 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Jan 14 02:24:02 MST 2011
See:
http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip
0 Kudos