USB examples documentation

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

USB examples documentation

308 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wrighflyer on Mon Mar 08 11:09:06 MST 2010
I just thought I'd post this as it took me a while to find it and it may save someone else a little time.

The examples you can download for Xpresso 1343 for USB appear (apart from the ones that use ROM functionality) to come from a library authored by Keil but I couldn't find anything supplied describing the APIs available or how they are used/combined to make a solution. (the .h files are hardly "self documenting" :-( )

I searched the Keil site but couldn't find anything obvious apart from the fact that the USB lib appeared to be "RL-USB" a component of "RL-ARM" and that actually lead finally to arm.com where this PDF can be found:

http://infocenter.arm.com/help/topic/com.arm.doc.dui0374a/DUI0374A_rl_usb_user_guide.pdf

(the text is also online at arm.com). That appears to be describing the same API functionality as found in the Xpresso USB examples and hopefully will prove useful to someone (me too I'm kind of hoping!)
0 Kudos
3 Replies

285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Mar 09 04:40:45 MST 2010
Hi,

Sorry for misunderstanding.

Those examples are supplied to us by NXP and so you will have to see what they say. I will get somebody at NXP to respond.

Thanks
0 Kudos

285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wrighflyer on Tue Mar 09 03:58:21 MST 2010

Quote: CodeRedSupport
Hi,

I assume you are referring to CMSIS, rather than the examples themselves.


No I'm referring to the examples themselves. In particular, for the 1343 Xpresso there is an example called "usbcdc", unlike the MSD and HID examples that use the ROM code and therefore are very simple and easy to follow this example generates over 11K of code and centers around source files usbcore.c, usbdesc.c, usbhw.c and usbuser.c together with the actual demo source files that call on APIs within those files. I simply wanted to modify the demo so that instead of it acting as a bridge between a virtual comm port on USB-CDC and the phsyical serial port of the Xpresso I wanted to use it to write a menu driven interface that operates only over USB (as a Vcomm driven by something like Hyperterminal on the PC) and forget the physical serial port all together. So at the end of the day I was looking (simplistically) for a USB_putchar() and USB_getchar() style of function. I can see that these are kind of provided by USB_WriteEP() and CDC_RdOutBuf() but I see calls being made to CDC_GetSerialState() and CDC_NotificationIn() and didn't really understand why. So I went looking for some documentation. The usb*.c files have:
 *      This software is supplied "AS IS" without any warranties, express,
 *      implied or statutory, including but not limited to the implied
 *      warranties of fitness for purpose, satisfactory quality and
 *      noninfringement. Keil extends you a royalty-free right to reproduce
 *      and distribute executable files created using this software for use
 *      on NXP Semiconductors LPC microcontroller devices only. Nothing else 
 *      gives you the right to use this software.
 *
 * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.

and hence my trawl round to find Keil documentation for the routines.

I *think* I found it in that .PDF I linked to.

Without such documentation I don't really see what the point of the usbcdc example is - sure it does what it says on the tin but after that, if there's no explanation of what it's doing or how it could be modified, then what?

Cliff
0 Kudos

285 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 08 13:36:29 MST 2010
Hi,

I assume you are referring to CMSIS, rather than the examples themselves. CMSIS is a standard being developed by ARM and all of the Cortex-M licensees (such as NXP) to produce a consistent programming interface for all Cortex-M based microcontrollers (something that was sadly lacking for ARM7 etc).

You can find more details at:
www.onarm.com
0 Kudos