LPC1343 - Debug connection fails

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

LPC1343 - Debug connection fails

2,144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gewuerzwiesel on Sun Nov 21 22:29:47 MST 2010
Hi there,
I have installed LPCXpresso 3.5 on my laptop with WinXP SP3.
After installing I plugged in the usb connection to the taget LPC1343, and installed the driver. The Windows device manager shows "USB device with DFU Capabilities".
Afterwards I started a debug session with the blinky example.
--> Error Message: Connect to emulator or board: NXP LPC1300; No emulator or board available.
The Windows device manager still shows "USB device with DFU Capabilities".
If I use the switch "Initialize LPC-Link as HID", re-power the system and try again:
--> Error Message: Connect to emulator or board: NXP LPC1300; No emulator or board available.
Now switching to the command line as suggested in other threads:
--> "[I][COLOR=Sienna]dfuapp /f LPCXpressoFS.enc[/COLOR][/I]" command makes the "USB device with DFU Capabilities" disappear from device manager.
--> Now issuing the following command gives no results:
[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\bin>dfuapp /f LPCXpressoFS.enc

D:\nxp\lpcxpresso_3.5\bin>crt_emu_lpc11_13_nxp.exe -g -2 -pLPC1343 -wire=winusb -info-target
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in D:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Nc: Looked for vendor directory XML file in D:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Nc: Found generic directory XML file in D:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Pc: (  5) Remote configuration complete
Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device
Pc: (100) Target Connection Failed
[/COLOR][/I]
Next command line option:
--> "[I][COLOR=Sienna]dfuapp /f LPCXpressoHS.enc[/COLOR][/I]" command makes the "USB device with DFU Capabilities" disappear from device manager, same results as above.
Next command line option:
--> "[I][COLOR=Sienna]dfuapp /f LPCXpressoWIN.enc[/COLOR][/I]" command makes the "USB device with DFU Capabilities" disappear from device manager, but now instead of DFU the "LPC-Link Debug Probe v1.1" appears!
Now issuing command as above:
[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\bin>dfuapp /f LPCXpressoWIN.enc

D:\nxp\lpcxpresso_3.5\bin>crt_emu_lpc11_13_nxp.exe -g -2 -pLPC1343 -wire=winusb -info-target
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in D:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Nc: Looked for vendor directory XML file in D:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Nc: Found generic directory XML file in D:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Pc: (  5) Remote configuration complete
Pc: ( 30) Emulator Connected
Pc: ( 40) No Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
Nc: SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0  Poll delay: 0.
Nc: NXP: LPC1343  Part ID: 0x3D00002B
Pc: ( 65) Chip Setup Complete[/COLOR][/I]

I actually tried to boot into the ISP mode and connect, but this also failed!
So, by now I need some help!
Thanks in advance to all!
0 Kudos
Reply
10 Replies

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thanseen on Tue Jan 25 09:20:04 MST 2011
I am having the same issue.  Can you please tell me how to "ensure that lpcxpresso.exe can execute cscript."  Also, if LPCXpresso cannot execute csript, can you please tell me how to change that?  It looks like something needs to be done in the Windows registry.  That is not familiar territory, so step-by-step would be good.

Thanks!
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gewuerzwiesel on Wed Nov 24 15:14:20 MST 2010
Dear Support Members,
I actually solved my problem.

After trying to run the script I found out that the Windows Script Host was disabled on my system. I just had to change it in the Windows registry, restart my computer, and now it works with the HID probe!
Thanks
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Nov 24 08:38:43 MST 2010
You don't mention in what way it fails to debug. Can you tell us what errors are reported? It might be an entirely different problem.

PS: You need to ensure that lpcxpresso.exe can execute cscript. Just because you can execute them from the command line, doesn't mean that your firewall/AV/security will allow LPCXpresso to run them.
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dandumit on Wed Nov 24 06:38:44 MST 2010
Did you manage to fix it ?
I have tried several times without success ...

I have tried what you have suggested and I have run :

Quote:

C:\nxp\lpcxpresso_3.5\bin\Scripts>finddfu.cmd
Class GUID: {36FC9E60-C465-11CF-8056-444553540000}
Description: USB Device with DFU Capabilities
Device ID: USB\VID_0471&PID_DF55\5&2CA5A2BA&0&3
Manufacturer: Philips (NXP)
Name: USB Device with DFU Capabilities
PNP Device ID: USB\VID_0471&PID_DF55\5&2CA5A2BA&0&3
Service: DFU

C:\nxp\lpcxpresso_3.5\bin\Scripts>



It seems that cscript it's running normal but fails to debug.. :(


10x
Daniel
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 23 00:48:52 MST 2010

Quote: Gewuerzwiesel
Hi there,
my OS is Windows XP Service Pack3.
I am using direct connection (no hub).

So let us please start again:
If I am using WinUSB Probe, I have to plug in my LPC1343 board and then manually DFU the target to establish LPC link. The IDE won't do this for me.
If LPC link appears into device manager, I try to start a debug session with blinky example.
Then the IDE tells me:
[COLOR=Sienna][I]Set remotetimeout 60000[/I][/COLOR]
and the popup window tells:
Remote Communication Error: No error

Does that give a hint for my problem?



Not really. Typically, you do not need to manually DFU the probe before starting the IDE. The LPCXpresso IDE will do it when necessary. The only reason to perform this step yourself is to resolve any issue with the DFU. After a DFU attempt, you may need to disconnect power (USB cable), for the LPC-Link to reboot the DFU loader. The success of the DFU may be hit or miss on your system, and if so, it's usually timing related. (see below).  The sure way to verify the WinUSB probe has booted is to check the Device Manager "Universal Serial Bus Controllers" for the LPC-Link entry.

If you look in the LPCXpresso IDE '<install>\bin' directory, you'll find the 'Scripts' subdirectory. The IDE uses the bootLPCXpresso.cmd script to select a probe to DFU. In rare circumstances, it's necessary to change the DFU utility timeout value.  The default is 250 ms (i.e. /tl 250 parameter).  If the DFU is not succeeding on your XP system, first try to increase this timeout.
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 23 00:46:00 MST 2010
This problem is most likely caused by your Anti-virus/firewall/security settings.

We are using the "cscript" Windows utility to scan USB and boot the LPC-Link. If we are unable to run this utility, this will explain the problems you are seeing.

Please ensure that LPCXpresso can run this utility.
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gewuerzwiesel on Mon Nov 22 22:55:54 MST 2010
Hi there,
my OS is Windows XP Service Pack3.
I am using direct connection (no hub).

So let us please start again:
If I am using WinUSB Probe, I have to plug in my LPC1343 board and then manually DFU the target to establish LPC link. The IDE won't do this for me.
If LPC link appears into device manager, I try to start a debug session with blinky example.
Then the IDE tells me:
[COLOR=Sienna][I]Set remotetimeout 60000[/I][/COLOR]
and the popup window tells:
Remote Communication Error: No error

Does that give a hint for my problem?
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Nov 22 16:34:04 MST 2010
You still haven't specified which OS is installed on your machine, but I did notice the WinUSB probe was responding based on your earlier post.


Quote: Gewuerzwiesel

Now issuing command as above:
[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\bin>dfuapp /f LPCXpressoWIN.enc

D:\nxp\lpcxpresso_3.5\bin>crt_emu_lpc11_13_nxp.exe -g -2 -pLPC1343 -wire=winusb -info-target
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in D:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Nc: Looked for vendor directory XML file in D:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Nc: Found generic directory XML file in D:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Pc: (  5) Remote configuration complete
Pc: ( 30) Emulator Connected
Pc: ( 40) No Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
Nc: SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0  Poll delay: 0.
Nc: NXP: LPC1343  Part ID: 0x3D00002B
Pc: ( 65) Chip Setup Complete[/COLOR][/I]



I recommend you use this one, and uncheck (if checked) the box in your Preferences (mentioned earlier) which forces the LPCXpresso IDE to use the HID probe. Connect the probe directly to the USB port on your machine, and not via an external hub.


Quote: Gewuerzwiesel
Thanks for your help so far!

But my current issue is that when i use the commands:
[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\dfuapp /f LPCXpressoHS.enc[/COLOR][/I]

[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\bin>crt_emu_lpc11_13_nxp.exe -g -2 -pLPC1343 -wire=hid -info-target
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in D:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Nc: Looked for vendor directory XML file in D:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Nc: Found generic directory XML file in D:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Pc: (  5) Remote configuration complete
Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device
Pc: (100) Target Connection Failed[/COLOR][/I]

Something seems to go the wrong! No LPC-Link is established in Windows device manager. And the target connection fails.
I tried it with my other notebook running WinXP SP2, it's same behaviour!
Switching to another USB cable didn't work as well.
If I use the IDE to debug, I always get a debug error, regardless of the settings (HID / WinUSB). So I can't let the IDE do the rest.... Sorry.
I appreciate your help!

0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Gewuerzwiesel on Mon Nov 22 11:40:17 MST 2010
Thanks for your help so far!

But my current issue is that when i use the commands:
[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\dfuapp /f LPCXpressoHS.enc[/COLOR][/I]

[I][COLOR=Sienna]D:\nxp\lpcxpresso_3.5\bin>crt_emu_lpc11_13_nxp.exe -g -2 -pLPC1343 -wire=hid -info-target
Pc: (  0) Reading remote configuration
Ni: LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Nc: Looked for chip XML file in D:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Nc: Looked for vendor directory XML file in D:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Nc: Found generic directory XML file in D:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Pc: (  5) Remote configuration complete
Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device
Pc: (100) Target Connection Failed[/COLOR][/I]

Something seems to go the wrong! No LPC-Link is established in Windows device manager. And the target connection fails.
I tried it with my other notebook running WinXP SP2, it's same behaviour!
Switching to another USB cable didn't work as well.
If I use the IDE to debug, I always get a debug error, regardless of the settings (HID / WinUSB). So I can't let the IDE do the rest.... Sorry.
I appreciate your help!
0 Kudos
Reply

2,013 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Nov 21 23:49:31 MST 2010
You have an operational LPC1343 LPCXpresso. For any HID probe, (i.e. LPCXpressoFS.enc (full speed), LPCXpressoHS.enc (high speed)), the correct argument on the stub command-line is '-wire=hid'. The LPCXpressoWIN.enc probe supports WinUSB only, and uses the '-wire=winusb' option. The '-wire=' argument must match the probe you've DFU'd to your target. The LPCXpresso IDE will construct these command-lines based on your probe preference for WinUSB or HID. See Window -> Preferences -> LPCXpresso -> Debug Options (1). Here you'll find a check box titled "Initialize LPC-Link as HID (Requires power cycle)".

The LPCXpresso IDE makes some decisions based on your Windows version. For example, we've found some dated Windows XP systems are not reliable with HID high speed, so we have a full speed only version of it. This may be a reflection on dated hardware as much as Windows XP. Windows 7, Windows Vista, and most Windows XP (SP 3) support WinUSB, and this probe uses USB high speed.

In conclusion, it looks like you're good to go. Set your probe preference based on what you've found out, and let the IDE do the rest.

Regards,

CodeRedSupport
0 Kudos
Reply