2009-07-26 09:42 PM
Debugging USB
2011-05-17 04:18 AM
Hi all i use KEIL and device STM32F103T8
I want to know how to debug USB? The code that I implemented in my code is the virtual com port code example. This works beautifully but want to change the code to receive more than a single byte at a time and buffer this ? Any suggestions ? DMA ?2011-05-17 04:18 AM
Nico,
I think if you use more than 1 byte at a time, you will no longer have a communication class device, and you will have to use a custom USB driver on the PC side of things. If you don't have one you can use the libusb-win32 open source driver (C code), or NI VISA's USB interface (LabVIEW code). Phil2011-05-17 04:18 AM
psd:
Not true, number of bytes per transfer is not fixed to one for CDC. That would be pretty useless. nico1: lanchon posted a vcom package here on the forum long ago with an improved virtual com port example. The ST code is rather flawed but seems to work often enough. As far as I recall lanchon's version had receive (but not transmit) buffering. By the way, I think ST's sample code has 64 bytes wMaxPacketSize so if the application on the host is providing data fast enough, you should already be getting more than one byte per transfer.2011-05-17 04:18 AM
:)
Thank you guys for the reply. I will try and find the enhanced Vcom example. Any comment about debugging USB in keil?2011-05-17 04:18 AM
Quote:
Any comment about debugging USB in keil?
As far as Keil is concerned , it's all just software: it neither knows nor cares what that software is intended to do - whether it's USB, async serial, or anything else. If you (think you) have specific USB issues, then you probably need some specific USB test gear; eg,