Problem with usbmem

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

Problem with usbmem

931 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Sun Oct 23 07:20:10 MST 2011
Hi dear LPC users. I have LPCXpresso board with LPC1769 and trying to start project "USBMem". I connect D+ and D- to the proper wires of usb cable. In device manager i see it as "usb stroage device" but i don't see it in my computer. And after a while in device manager i see the error
Quote:
Couldn't start the device(error code 10)

. How solve this problem?
P.S. Sorry for my bad english.
0 Kudos
49 Replies

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pauls on Wed Aug 29 04:16:12 MST 2012
I have just found the problem with the USBMem example with DMA, the endpoints are set to 4&5 instead of 2&3.  There is no code to support endpoints 4&5, so you just get an error interrupt and you get no diskimage data transfered:(.

in usbcfg.h

[COLOR=#3f7f5f][COLOR=#3f7f5f][COLOR=black]#define USB_DMA_EP 0x00000030[/COLOR]
[COLOR=black][/COLOR]
[COLOR=black]this is used in the the [/COLOR][COLOR=#3f7f5f][COLOR=#3f7f5f][COLOR=black]USB EP DMA Enable register[/COLOR]  [COLOR=black]EpDMAEn[/COLOR][COLOR=#000000][COLOR=black] to[/COLOR] set the endpoints to be used.[/COLOR][/COLOR][/COLOR]
[COLOR=#3f7f5f][COLOR=#3f7f5f][COLOR=#000000][/COLOR][/COLOR][/COLOR]
[COLOR=#3f7f5f][COLOR=#3f7f5f][COLOR=#000000]and should be [/COLOR][/COLOR][/COLOR]
[COLOR=#3f7f5f][COLOR=#3f7f5f][COLOR=#000000][/COLOR][/COLOR][/COLOR]
[COLOR=#3f7f5f][COLOR=#3f7f5f][B][COLOR=#7f0055][COLOR=#7f0055][COLOR=black]#define[/COLOR][/B][/COLOR][/COLOR][COLOR=#000000][COLOR=black] USB_DMA[/COLOR]_EP 0x0000000C[/COLOR]
[COLOR=#000000][/COLOR]
[COLOR=#000000]for endpoints 2&3.[/COLOR]
[COLOR=#000000][/COLOR]
[COLOR=#000000]Looking via an analyser all the coms with endpoint 0 where OK, but when it got to endpoint 2 for the mass storage it all stopped :eek:.[/COLOR]
[COLOR=#000000][/COLOR]
[COLOR=#000000][/COLOR]
[COLOR=#000000]Paul S[/COLOR]
[/COLOR][/COLOR][/COLOR][/COLOR]
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Sun Oct 30 10:06:47 MST 2011
I do so
USB_DMA_DESCRIPTOR pDD;
pDD.BufAdr = DMA_BUF_ADR;
pDD.BufLen = DMA_BUF_SZ;
pDD.MaxSize = 64;

USB_DMA_Setup(DD_NISO_CNT, &pDD);
USB_DMA_Enable(DD_NISO_CNT);
USB_DMA_ReqSet(DD_NISO_CNT);
but no effect. USB_DMA_IsUsed(DD_NISO_CNT) return FALSE, and USB_DMA_Status(DD_NISO_CNT) return USB_DMA_BUSY. What is incorrect?
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Sun Oct 30 00:55:48 MST 2011
Is anybody using this example with DMA ?
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Wed Oct 26 23:21:36 MST 2011
Connecting D+ to 3.3V with a resistor indicates a high speed USB device (USB2.0). Connecting D- to 3.3V with a resistor indicates the pc that the USB device is a low speed one.:D
If you don't see a difference with or without resistor then i have a question for Zero: could the internal pullup cause this?
And what if you have a 5V USB connection because i read this
Quote:
Pad provides digital I/O and USB functions. It is designed in accordance with the USB specification, revision 2.0 (Full-speed and Low-speed mode only). [B][U][COLOR=red]This pad is not 5 V tolerant[/COLOR][/U][/B].

in the product data sheet of the LPC1769
Quote:
http://ics.nxp.com/products/lpc1000/datasheet/lpc1763.lpc1764.lpc1765.lpc1766.lpc1767.lpc1768.lpc176...


By means of USB_CONNECT you can switch the resistor on and off to reset the USB connection with the USB-HOST.:p
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Wed Oct 26 10:14:06 MST 2011
And how use it without switching off DMA?
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Mon Oct 24 11:10:34 MST 2011
Zero, thanks a lot! It is a solution of my problem.
I have only one question: why there is the same result when i onnect D+ with a 1.5K resistor to 3.3V and without it?
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 10:05:35 MST 2011
Try to switch [COLOR=Red]off[/COLOR] DMA in usbcfg.h:
#define USB_DMA        0
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Mon Oct 24 09:46:41 MST 2011
[B]Zero[/B] thanks for link. I'm incorrect wired VBus.  I will try to use it.
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 07:57:36 MST 2011
Did you try to connect USB-Connect?

Like page 4 of: http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Sam Gold on Mon Oct 24 07:47:47 MST 2011
yes
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ex-member on Mon Oct 24 02:38:54 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 02:30:54 MST 2011
Take a look at page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 02:12:28 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 02:04:00 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Mon Oct 24 00:02:18 MST 2011
Did you at least connect D+ with a 1.5K resistor to 3.3V?
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Oct 23 22:41:26 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Oct 23 19:21:09 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Oct 23 18:32:08 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Oct 23 18:10:55 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos

800 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Oct 23 16:17:52 MST 2011
Could be useful to use USB :eek:

Especially USB-Connect as shown in other schematics like page 4 of:

http://support.code-red-tech.com/CodeRedWiki/RDB1768V2Support?action=AttachFile&do=get&target=rdb176...
0 Kudos