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]