EmbDev.net

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


Author: Ky Dc (noz)
Posted on:

Rate this post
0 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

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.