While trying to debug process freezes with this message in bottom bar: Launching MyProject 97% but sometimes reports 94%...

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

While trying to debug process freezes with this message in bottom bar: Launching MyProject 97% but sometimes reports 94%...

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Sun Oct 20 15:35:12 MST 2013
While trying to start up a new custom board using the LPC1227F/301 I can't get past the Launching MyProject 94% and sometimes 97% message at the bottom bar. Seems to freeze at this point.  I have verified that my SWD port is per the NXP design guidelines and my connector is within 1/2 inch from the processor. I have ruled out the ribbon cable (tried two different cables and only 6" long) between the LPC-LINK board  and my board including the USB cable (tried two different cables) between the PC and the LPC-LINK. When connected to the Xpresso target board, debugging works fine. If I switch to release it seems to flash the device but my code doesn't run..  Of course I have checked power and is per specification.

Any help will be greatly appreciated due to that I'm up against a crazy deadline... What a show stopper!

Here what the debug console reports:

LPCXpresso Debug Driver v6.0 (Sep 10 2013 00:02:28 - crt_emu_lpc11_13_nxp build 1208)
Looked for chip XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/LPC1227/301.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID:  BB11477. Info: HID64HS12
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Loaded LPC11_12_13_128K_8K.cfx: LPC11_12_13 (128K Flash, min 8K RAM) Nov 21 2012 14:49:36  On-chip Flash Memory
NXP: LPC1227/301  Part ID: 0x00000000
( 65) Chip Setup Complete
Connected: was_reset=false. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 7940 bytes to 0000 in Flash (assumed clock: 12.0MHz)
Erased/Wrote page  0-1 with 7940 bytes in 1171msec
Flash write Done

When I connect to the Xpresso target board here is what I get (It goes into debug fine):

LPCXpresso Debug Driver v6.0 (Sep 10 2013 00:02:28 - crt_emu_lpc11_13_nxp build 1208)
Looked for chip XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/LPC1227/301.xml
Looked for vendor directory XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/LPCXpresso_6.0.4_159/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID:  BB11477. Info: HID64HS12
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Loaded LPC11_12_13_128K_8K.cfx: LPC11_12_13 (128K Flash, min 8K RAM) Nov 21 2012 14:49:36  On-chip Flash Memory
NXP: LPC1227/301  Part ID: 0x00000000
( 65) Chip Setup Complete
Connected: was_reset=false. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 7940 bytes to 0000 in Flash (assumed clock: 12.0MHz)
Erased/Wrote page  0-1 with 7940 bytes in 1182msec
Flash write Done
nSRST assert (if available)
Executing in user flash.

Stopped: Breakpoint #1


0 Kudos
19 Replies

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 29 07:30:38 MST 2013
Yes, the Xpresso board I was referring to is the LPC1227 one.
They do not have an external pull-up on the ISP pin.
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Oct 23 09:39:49 MST 2013

Quote: lpcxpresso-support
Embedded Artists does use a PIO0_12 pull-up on the LPC12D27 Quickstart Board. I don't know which debug circuit designs keithco has reviewed, but a 10K ISP pull-up is a typical value.



Probably the one without pullup:

http://www.embeddedartists.com/sites/default/files/docs/schematics/LPCXpressoLPC1200revB.pdf

Which is a typical LPCXpresso-Board without it  ;-)

0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Oct 22 20:42:00 MST 2013
Embedded Artists does use a PIO0_12 pull-up on the LPC12D27 Quickstart Board. I don't know which debug circuit designs keithco has reviewed, but a 10K ISP pull-up is a typical value.

Regards,
LPCXpresso Support
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 22 18:18:41 MST 2013

Quote: keithco
... I can't find it on the Embedded Artists schematic for the LPC1227 Xpresso board...


They rely on the internal pullup. That's working with a greater Reset pullup (EA board: 12k).

But the better choice is to use an ISP pullup, that's avoiding surprises...

0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 22 17:50:56 MST 2013
Wow! The 10K pull-up resistor on the ISP pin did the trick.
I'm up and running... Though, I'm confused, why I've seen several commercial designs that have NOT implemented this pull-up??? Unless I'm not seeing it, I can't find it on the Embedded Artists schematic for the LPC1227 Xpresso board...

Thank you very much for all of your technical support!
NXP has fantastic products, but most important, awesome support!! :)

Regards,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 22 11:30:21 MST 2013

Quote: keithco
Another question... I'm using the default ISP pin as a power source for a low current device.
I'm going to have to add a pull-up. In the future, is it best to leave this pin dedicated for a push button for ISP mode?



If it's possible, yes ( I prefer a small jumper). If you need this pin, add a pullup. It's also a good idea to scope ISP and Reset to ensure that ISP is high during Reset.

But you are right, if there are still other pins available, I would always avoid to use ISP pin. 
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 22 09:52:33 MST 2013
Another question... I'm using the default ISP pin as a power source for a low current device.
I'm going to have to add a pull-up. In the future, is it best to leave this pin dedicated for a push button for ISP mode?

Thanks,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 22 09:20:38 MST 2013

Quote: keithco
Are you saying that SWDIO and SWCLK don't need a pull-up or a pull-down resistor respectfully?



Yes   :)

The dangerous pins are Reset and ISP. Your ISP pullup shouldn't be greater than your Reset pullup. And Reset caps are dangerous, too (your small 22pF is no problem). Everything else is usually not causing problems with LPC-Link or LPC-Link2 (even with my 0.4m Debug connection)  ;-)
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 22 08:55:24 MST 2013
I tacked a 100K pull-up on the ISP pin.
Looks like I need to change this value when I get back to my lab.
Yes, I tried enabling Vector Catch but with the 100K pull-up.
Are you saying that SWDIO and SWCLK don't need a pull-up or a pull-down resistor respectfully?
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Oct 22 08:41:41 MST 2013
Keith, I'm missing an ISP pullup (10k or lower). I've seen dozens of custom boards without any pullup / pulldown for SWD.

Just pullups for Reset and ISP, no Reset cap and a simple SWDCLK/SWDIO/Reset/GND debug connection.

Did you try a simple ISP pullup and enabled Vector Catch already?
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 22 07:18:26 MST 2013
I forgot to mention that I have several LPC-LINK boards that I have severed the connections to the target.
I get the same result regardless which one I use....
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Tue Oct 22 07:07:40 MST 2013
Hello,

Can you take a look specifically, at my SWD connections, see attached PDF.
I did notice, that I did not connect to the SWV pin on the SWD connector.

Thanks,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Oct 22 03:12:22 MST 2013
So it sounds like it probably isn't an issue with code you have previously downloaded into flash then.

So if it works with the LPCXpresso boards own LP1227, but not with your boards, then at this point I would suspect an issue with your board. Again check debug/reset circuitry against the FAQ I pointed you at previously...

http://www.lpcware.com/content/faq/lpcxpresso/debug-design

The other thing that might be worth checking is that you really have split/recombined your LPCXpresso / LPC-Link correctly.

Regards,
LPCXpresso Support

0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Mon Oct 21 17:44:27 MST 2013
Hello NXP support,

I tried your suggestions with the ISP and RESET pins following the instructed sequence.
I also performed the Mass memory erase and still have the same problem as originally posted.
What do you suggest I do at this point?

Regards,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Mon Oct 21 07:41:25 MST 2013
Hello,

I will try this new procedure this afternoon.
To answer your question, no, I have never successfully debugged either of my two new boards.
The confusing thing is that the LPC-LINK is connecting to both board and are both acting exactly the same.
I have eight more but don't want to connect to these until I figure out what is going on....

Thanks,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Oct 21 06:34:09 MST 2013
Make sure that you are releasing the chip from reset **before** you release ISP.

That aside, you could try mass erasing straight after booting the board into ISP mode.

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

Then reboot the board again, and now try starting a debug connection. Does this then work.

It would also be potentially useful to know where you have ever managed to make a successful debug connection to your board?

Regards,
LPCXpresso Support
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Mon Oct 21 04:09:21 MST 2013
Hello again,

Well, I tried setting the device into ISP mode by dragging GPIO0_12 low and then applying a reset then removing the low on GPIO_12 then letting the reset to return high.
Same problem as I stated in my first post.
Something else observed.. When I get the last line in the console "Flash write Done" if I assert a manual reset it finishes the debug process but I get this message:
[color=#f00]No source available for "(gdb[6].proc[42000].threadGroup[i1],gdb[6].proc[42000].OSthread[1]).thread[1].frame[0]"  [/color]
Also, now get access to the "Terminate" and "Resume" icons on the tool bar. If I select the Terminate I can then click on the debug icon and don't have to disconnect the USB cable to the LPC-LINK board in order to try again.
Any other suggestions?

Cheers,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by keithco on Mon Oct 21 03:10:50 MST 2013
Hello,

Thanks for your suggestions...
Yes, I saw this yesterday and tried booting in ISP mode with no success.
I'll check the datasheet again and see if the 1227 requires only one ISP pin to be tied low...

Regards,

Keith
0 Kudos

855 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sun Oct 20 23:50:43 MST 2013
From what you have said, I presume that you have already browsed this..

http://www.lpcware.com/content/faq/lpcxpresso/debug-design

Anyway, in the first place, try booting your part into ISP mode and then connecting...

http://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access

Regards,
LPCXpresso Support
0 Kudos