usbhid problems

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

usbhid problems

483 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by raphaelh on Wed Nov 03 03:27:00 MST 2010
Hi All,

I need some help because I cannot make any sense of what I get when I try to run the usbhid example on my lcp1343 board.
I behaves all the time differently I don't where to start to have some consistency.
How can I make this example work on the first time I run "Debug 'usbhid'"???
Where should I look first to fix this?
Below is a summary of the results I get.

And another question: about the usbmsd example: when I run it the device is enumerated ok but when I try to read the drive I get:
Please insert a disk into removable disk instead of the readme file:
(usbmsd USB example that implements a Mass Storage Class
device with a readme.txt file on it.)


Thanks,
raphael



[B]1) After power up of my board if i run the "Debug 'usbhid'":
[/B]I see the "initializing lpc link" and the device being configured.
Then I get the error message:


LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Looked for vendor directory XML file in    
C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in 
C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
02: Failed on connect: Ee(82). Device not found
31: No connection to emulator device

And I see that the usb is enumerated as a drive with a file called: firmware.bin

[B]2) I rerun the "Debug 'usbhid'" a second time
[/B]
I dont see the "initializing lpc link" window
I get into debug mode and it works, I can use the application :
"LPC1343 HID Demonstration.exe"

I just have the message: "Stalled on bus operation" blinking very fast in the bottom left of eclipse

[B]3)Then if I stop the debugger and rerun the "Debug 'usbhid'" a third time
[/B]I get:
LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
02: Failed on connect: Ee(82). Device not found
31: No connection to emulator device

I this I get now every time I try to rerun the debug mode
I need to power down the board to start again


[B]Sometime I also get things like that:
[/B] Flash write Done
nSRST assert (if available)
Executing in user flash.
Stopped (Was Reset)  [Reset from  PowerOn, External, SysRes]
GDB trying to set entry point of 0x0124, but correct entry is 0x1FFF0104
Stopped: Breakpoint #1

[B]And sometime I also get things like that:
LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Invalid LPC1343 Part ID: 0x3000002B
0 Kudos
8 Replies

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Nov 04 09:05:43 MST 2010
We have asked NXP to look into whether this is an issue with your board.

Regards,
CodeRedSupport
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by raphaelh on Thu Nov 04 01:14:23 MST 2010
I tried all that you suggested.... same results
I am running on windows 7, 64 bits
What is the recommended system? Is there a preferred one?


loaded demo --> ok,
then I loaded blinky --> ok,
then i tried to load demo again --> I got the error message below:
then I tred blinky again --> I got the same error message

If i do the reset thing after getting an error I still have to power down the board in  order to successfully rerun another application. So once I get into the mode where there is the error message the reset seems not to work anymore.


So so far i can run the different configurations on LPC-Link/MCU board standalone but i need to power down each time I want to load a new configuration.
My goal is to use the usb applications with the base board, and then i get other strange errors and the example applications do not work at all as they should.

thanks for your help
r.
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Nov 03 10:19:40 MST 2010

Quote: raphaelh

You need the baseboard....or do suggest to ground the P0.1 (with a wire???) on the LPC-Link/MCU board standalone???


Yes,  just ground P0.1 with a wire with the LPC-Link/MCU board standalone, and use another wire to trigger reset.

Having done this, do you still see error the second time that you load blinky?

If so, can you try swapping out the USB cable for another one, and seeing if that makes any difference?

Also what operating system are you running, and are you are running the OS natively or under a virtual machine?

One other thing to try might be to try lowering the debug connection speed being used. To do this:

[LIST]
[*]Right click on the project you are downloading in the Project Explorer view.
[*]Select Launch Configurations -> Open current launch configuration.
[*]Click on the "Debugger" tab.
[*]Scroll down in the "Script values" box to "Maximum wire speed" and select, say, 1000. Then click close.
[*]Now try launching the debug session again from the Quickstart panel.
[/LIST]
If this still doesn't help, then you could try dropping it further (the lowest setting is 150). However I have never seen an LPCXpresso1343 not connect successfully at the default speed (which is 3000), so I am dubious this will help - but you never know!

Regards,
CodeRedSupport
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by raphaelh on Wed Nov 03 10:00:07 MST 2010
yes I am using the Embedded Artists baseboard
To run the usb examples so I use the base board

My guess was that to perform this: [I]boot into the ISP. That is, GND P0.1, and assert RST, then remove the GND to P0.1. Once in the ISP, the target clock configuration is stable, and you should be able to connect.
[/I]
You need the baseboard....or do suggest to ground the P0.1 (with a wire???) on the LPC-Link/MCU board standalone???


With the LPC-Link/MCU board standalone connected directly to my PC's usb port I also have troubles.
I loaded demo --> ok,
then I loaded blinky --> ok,
then i tried to load demo again --> I got the error message below:
then I tred blinky again --> I got the same error message

GDB trying to set entry point of 0x03B4, but correct entry is 0x1FFF0104
Stopped: Breakpoint #1
Stopped: Halt
(crt_emu_lpc11_13_nxp) terminating on communication loss: Pipe has been closed by GDB.
LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: True.
Packet delay: 0  Poll delay: 0.
Invalid LPC1343 Part ID: 0x3000002B



thanks for your help
raphael
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Nov 03 09:16:18 MST 2010
You mention three USBs - are you connecting the LPCXpresso board (LPC-Link plus the MCU) to an Embedded Artists baseboard? http://www.embeddedartists.com/products/lpcxpresso/xpr_base.php

If so, I would suggest for the moment disconnecting the two and using the LPC-Link/MCU board standalone.

Also if you are connecting via a usb hub try connecting directly (or if you aren't try doing so - making sure that the hub is a powered one). Normally we don't recommend the use of a hub for the debug usb connection as it can cause problems - but it might be worth trying in case your PC is not providing enough power.

With regards to putting the board into ISP mode, on my LPCXpresso1343 board P0.1 is labelled FT/GPIO and is between USB-DP and USB-VBus on the right hand side (looking at board with the MCU at the bottom and the LPC-Link at the top). However my board is a very early one and the labelling might not be the same on yours. I would suggest you confirm from the schematics at:

http://ics.nxp.com/support/lpcxpresso/pdf/lpc1343.schematic.pdf

The error message you see if you don't power down between connections is strange:

Invalid LPC1343 Part ID: 0x3000002B
Known LPC1343 ID(s): 0x3D00002B
Basically, the tools should always read 0x3d00002b from the LPC1343, and they obviously do when you connect from power on. But I can't explain why the tools read something else the next time you connect.

Regards,
CodeRedSupport
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by raphaelh on Wed Nov 03 08:43:47 MST 2010
about the pwer down thing:

If i try to load twice the same setup (even blinky) on the board: it runs the first time.
Then even if I reset I get the error message below.
The only way I found to to reload it is to disconnect the board.




03: Failed on chip setup: Ec(01). Invalid, mismatched, or unknown part
LPCXpresso Debug Driver v2.0 (Aug 31 2010 23:36:44)
Looked for chip XML file in C:/nxp/lpcxpresso_3.5/bin/LPC1343.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.5/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.5/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: T1S6RGRIA
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: True.
Packet delay: 0  Poll delay: 0.
Invalid LPC1343 Part ID: 0x3000002B
Known LPC1343 ID(s): 0x3D00002B
03: Failed on chip setup: Ec(01). Invalid, mismatched, or unknown part
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by raphaelh on Wed Nov 03 07:13:10 MST 2010
The led blinking applications blinky, demo, are ok except that I often often have to power down (that is: disconnect all 3 usb links) to change an application.

What does taht mean: If this fails, you'll need to boot into the ISP. That is, GND P0.1, and assert RST, then remove the GND to P0.1. Once in the ISP, the target clock configuration is stable, and you should be able to connect.

is GND to P0.1. the jumper in J54????

Thanks,
raphael
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Nov 03 03:55:19 MST 2010
I think it is probably worth taking a step back from the USB side of things, and concentrating first of all on getting a reliable debug connection to your LPCXpresso board.

Please take a look at this FAQ:
http://support.code-red-tech.com/CodeRedWiki/FailedToConnect

and then try following the instructions to boot into the ISP in the linked FAQ at:
http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip

Then try building one of the led blinking applications from the examples, and see if you can successfully download and run this on your LPCXpresso board.

Regards,
CodeRedSupport
0 Kudos