STR710 And USB

OP #1173081
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
Moderator #1173082
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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.