USB pullup problem + usb_hid example problem

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

USB pullup problem + usb_hid example problem

721 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jan van den Borst on Sat Dec 12 08:18:07 MST 2009
Hi all,
I got 2 problems with USB

1) I just tried to hookup an usb cable to the lpc1343 following the instructions from the getting started. However if the pullup is connected to the D- the device is not recognized. If I connect the pullup to the D+ it works (just like in the schematics of the mcb1000 lpc1343 demo board from Keil.)

2) I cannot get the usbhid demo to work. The usbhid_rom works OK. Any idea's?

Jan
0 Kudos
18 Replies

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Fri Jan 15 10:49:19 MST 2010

Quote: Jan van den Borst
Hi All,
I still am not able to use the msd example. The msd is recognized but I cannot access the disk. Also I cannot format it to solve this problem

Jan



Hi Jan,
Does it show up as HID or Mass Storage in the Windows Devices control panel? If it shows up as HID then you must uninstall the HID driver and replug it before it will work. If not, could you describe the error message you are seeing?

Thank you,
-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jan van den Borst on Fri Jan 15 05:29:04 MST 2010
Hi All,
I still am not able to use the msd example. The msd is recognized but I cannot access the disk. Also I cannot format it to solve this problem

Jan
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Jan 12 22:31:53 MST 2010
Here is a pre-release of the updated USB examples from the new example pack which will be posted on the www.nxp.com/lpcxpresso-support website shortly. The HID test program has been removed from this attachment. You can use the same "LPC1343 HID Demonstration.exe" file included with the current complete examples archive to use the HID examples in this attachment.

-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Jan 12 10:38:11 MST 2010

Quote: domen
nimes, I can confirm I have the same issues. It was a PITA going though hw, switching cables, computers, to find it was only a non-working example :-(



We apologize for the inconvenience. A new package of examples will be released soon with USB corrections, as well as USB app notes for the LPC1343.
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by domen on Sat Jan 09 11:04:14 MST 2010
nimes, I can confirm I have the same issues. It was a PITA going though hw, switching cables, computers, to find it was only a non-working example :-(
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Fri Jan 08 16:44:30 MST 2010

Quote: Jan van den Borst
Hi all,
I got 2 problems with USB

[...]

2) I cannot get the usbhid demo to work. The usbhid_rom works OK. Any idea's?

Jan



Hi Jan,

There is a bug in the usbmsd_rom example. It does not explicitly enable the USB register block, which causes the ROM USB driver to hang while initializing USB. Add this line after EN_IOCON near the top of memory.c:
#define     EN_USBREG       (1<<14)

Modify the line that enables the peripherals in memory.c in main():
/* Enable Timer32_1, IOCON, and USBREG blocks */
  LPC_SYSCON->SYSAHBCLKCTRL |= (EN_TIMER32_1 | EN_IOCON | EN_USBREG);

This should solve the problem. The examples will be updated.
-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nimes on Thu Dec 24 03:15:12 MST 2009
Thank you for your reply!

Concerning PID/VID and drivers:
* before a driver gets assigned to a device, the PID/VID must first be detected by the PC. But when I plug in the LPCxpresso, the device manager says PID 0000, VID 0000, unkown USB device. So I assume the problem arises even before driver attachment.

* plugging in the LPCxpresso (configured with the usbmsd example) in another PC with no LPCxpresso history at all gives the same errors.

Just to check if my problem is a single case or a general one:
* are there any LPCxpresso forum users who can confirm that they have all the examples working? Or that they are facing the same issues?

Thank you all!
Merry xmas :-)
N.



Quote: NXP_USA
One thing we have seen that can cause trouble with the USB examples is the Windows driver install. Since the example projects all use the same USB Vendor ID and Product ID, if you try out the HID example and then try out the Mass Storage example, Windows may try to use the HID driver it had already installed with the Mass Storage example code. To fix this, go to the Windows Device Manager, find the broken "HID" device and select "Uninstall." Then unplug the device and plug it back in. Windows should correctly identify the device as being a Mass Storage Class device and install the correct driver.

-NXP

0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Dec 22 18:53:58 MST 2009

Quote: nimes
Hi all,

Any further news on the LCPxpresso USB "issues"?

I tried all examples in the "LPCXpresso Example Projects for LPCXpresso LPC1343 Target Board V1.00 (Dec 9, 2009) " folder. The only example that I got working instantly was "USBhid_rom", all others gave "unknown USB device".



One thing we have seen that can cause trouble with the USB examples is the Windows driver install. Since the example projects all use the same USB Vendor ID and Product ID, if you try out the HID example and then try out the Mass Storage example, Windows may try to use the HID driver it had already installed with the Mass Storage example code. To fix this, go to the Windows Device Manager, find the broken "HID" device and select "Uninstall." Then unplug the device and plug it back in. Windows should correctly identify the device as being a Mass Storage Class device and install the correct driver.

-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nimes on Mon Dec 21 16:33:05 MST 2009
Hi all,

Any further news on the LCPxpresso USB "issues"?

I tried all examples in the "LPCXpresso Example Projects for LPCXpresso LPC1343 Target Board V1.00 (Dec 9, 2009) " folder. The only example that I got working instantly was "USBhid_rom", all others gave "unknown USB device".

Hardware:
* LPC1343 xpresso board (with debugger or standalone 3V3 powered)
* 2K2 pullup from DP to 3V3
* USB wires: red VBUS, green DP, white DM, black GND

Since I find the keyword 'Enhanced' in my Device Manager (Windows Vista Business), I assume (!!) my USB ports are 2.0.

Thank you in advance for your time,
N.
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Mon Dec 21 11:13:38 MST 2009
> I do not have CR software, I am using my LPCXpresso board and HidViewer.
> Pawel

Hello Pawel,

Could you try running the LPC1343 HID Demonstration.exe program in the usbhid_rom directory? If it can detect the LPCXpresso board, it would verify the USB connections.

-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elektrknight on Thu Dec 17 15:44:20 MST 2009
Jan,

I do not have CR software, I am using my LPCXpresso board and HidViewer.

Pawel
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jan van den Borst on Thu Dec 17 13:31:24 MST 2009
Hi Pawel,
Does the exe provided by nxp/code red work?
Jan
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elektrknight on Wed Dec 16 13:36:20 MST 2009
Hi,

I got the the PC files, thanks for posting them!

I compiled my USBHID_rom, flashed the target but when I do GetDevice I get
"     " aka no device :confused: . I am sure it is my fault and I am
trying to debug from the PC side first. Since, HidViewer and the
wxWidget/CodeBlock are a bit of a hang-up for me I am in the process of
setting the hidviewer_csharp project in my version of VS.

I do not see anything wrong with my USBHID_rom bin which puzzles me.
Any chance you coud also post your USBHID_rom in bin or hex?

What license are you using for the PC code?

Pawel
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jan van den Borst on Mon Dec 14 12:57:06 MST 2009
Hi all,
As promised the usb PC code.
It can be downloaded from my website at  http://mijndingen.awardspace.biz/

HidInterface.zip
Contains a project to build a dll for hid communication. The project contains a codeblocks project (www.codeblocks.org)

HidViewer.zip
A codeblocks GUI demo project (needs codeblocks and wxWdigets library) Also needs mingw dll.

hidviewer_csharp.zip
Contains a C# example example project that uses the HidInterface.dll

Usage:
* First press init
* press GetDevice
* select the device in the combobox
* select open

Now the led can be toggled and the inputs can be read

Success
Jan
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Mon Dec 14 11:41:19 MST 2009
Hi Jan,

You are correct. The schematic in the Getting Started guide has the pullup on D- instead of on D+. The schematic has been revised for the next version of the Getting Started guide.

The LPC1343 operates in USB Full Speed mode only, not in Low Speed mode. Low speed mode is not required in a USB device in order to be USB certified. The USB 1.1 and 2.0 specs require that USB host and hubs support both USB Low speed and Full speed operation.

-NXP
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elektrknight on Mon Dec 14 11:11:55 MST 2009
Hi Jan,

I go it to work after reading your post and switching to Full Speed,
thanks for the tip!

Getting started may not be wrong, Low Speed should work I and tried it
because I was thinking this will be a safer approach for a bunch of wires
to pretend to be a nice USB connection. Cost me 2 days of tinkering
around and I am disappointed that NXP support did not bother to replay
with any hints. Even posting a real schematic of this thing would
help, actually schematic is available but not from NXP!
Check this thread for link
http://knowledgebase.nxp.com/showthread.php?t=11

USB on this chip is supposedly fully certified to USB 2.0 but that also
includes USB 1.1 so is it a hardware problem?


Glad to hear about your progress with usbhid_rom, please post
your usbhid_rom code and the dll!

I am working on CDC and just go it to compile. CDC size came out to
about 20k, it would be nice to use some of the code from ROM but this
is another mystery. I have size limitation and might have to switch to
HID.


Pawel
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jan van den Borst on Sun Dec 13 08:32:20 MST 2009
Hello Pawel,
I think indeed the getting started is wrong.
Look at the schematics of the Keil board at
http://www.keil.com/support/man/docs/mcb1000/mcb1000_to_schematics.htm
I'm also going to make the USB soft connect with the transistor and some resistors from this schematics.

Regarding USB:
The usbhid_rom example works fine. I managed to make a HidInterface dll from Keil code which work with this example (mingw, codeblocks). I can post this when I'm done. There are no sources included for the pc executable from the example.
0 Kudos

681 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elektrknight on Sat Dec 12 18:28:31 MST 2009
Hi Jan,

1 - I had the exact same experience with connecting USB. I followed
schematic in the getting started doc and I could not get USB
to even chirp. Could it be a problem with Low Speed? I have
to try you approach, good tip!

2 - How far did you get with the HID?


Pawel

P.S
This is a thread with description of what I was trying to get going.
http://tech.groups.yahoo.com/group/lpc1000/message/166
0 Kudos