cancel
Showing results for 
Search instead for 
Did you mean: 

USB programming

Posted on March 10, 2009 at 06:15

USB programming

2 REPLIES 2
Posted on May 17, 2011 at 13:05

I'm trying to write a PC program to control my STM32 via USB. I've to admit that I'm totally new to USB and don't know if I'm on the right track.

The first thing I did was to look at the source code of the USB HID Demonstrator tool, which is capable of toggling some LEDs and reading values from the potentiometer. But I'm pretty much overwhelmed from that piece of code and didn't understand too much. So I looked into some online documents and the USB 2.0 specification and it seems to me that USB is a pretty ''complicated'' protocol.

What I'm wondering now is if there's an easier way for USB communication or do I need to learn and implement the protocol specifications.

As I said before I'm totally new to USB and don't really have a clue. I used USART before, where I just needed to set up a few parameters (COM-port, speed, ...) and then I was able to send/receive messages.

Maybe someone can give me some more insight on that topic.

Thanks

budde2
Associate II
Posted on May 17, 2011 at 13:05

I would recommend to use the Virtual COM Port example to start with the USB programming.

You can simply adapt this code for your needs.