EmbDev.net

Forum: ARM programming with GCC/GNU tools STR710 And USB


von Ky D. (noz)


Rate this post
useful
not useful
Hello All
             I was hoping that someone would know of some example code
for the USB on the STR710. Ive hit a bit of a impass , the example code
from ST hasnt got many comments and that makes it REALLy hard for me to
follow and keil seem to be not fussed at all. I dont want alot of
functoinality just send a couple of bits of data across the usb now and
again. Ive googled and even tryed to learn how usb works properly but im
finding it hard to get to grips with it. ANY HELP IN ANY WAY WOULD BE
GREATLY APPRIATED

thankyou for your time
 Noz

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
I havn't done too much with USB and nothing so far with STR7 but
recently did some experiments with another target (LPC2368) as HID
device. So take the following for what it's worth:

Ky Dc wrote:
>              I was hoping that someone would know of some example code
> for the USB on the STR710. Ive hit a bit of a impass , the example code
> from ST hasnt got many comments and that makes it REALLy hard for me to
> follow and keil seem to be not fussed at all.

The ST example code UM0290 "STR7/STR9 USB developer kit" looks o.k. too
me. It is similar to code from other companies and for other targets
(i.e. Atmel AT91 USB library, Keil/ARM USB examples), so for a basic
understanding you might also check code from others. But I suggest to
read some general USB documentation first (i.e. from usb.org or the book
"USB complete").

> I dont want alot of
> functoinality just send a couple of bits of data across the usb now and
> again. Ive googled and even tryed to learn how usb works properly but im
> finding it hard to get to grips with it.

For just a "couple of bits of data" using the controller as Human
Interface Device (HID) might be a reasonable method since there is no
need to write an extra driver. Most modern OS should come with a
"generic" HID driver (i.e. MS Windows>=98). The joystick example that
comes with UM0290 can be used as template. Change to USB HID descriptor
to your needs and modify the handlers for EP0/Reports and the other
endpoints (if needed).

Martin Thomas

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.