2009-03-09 10:15 PM
USB programming
2011-05-17 04:05 AM
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. Thanks2011-05-17 04:05 AM
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.