Closed C47D closed 5 years ago
It was custom made class, used a C920 camera descriptor as the base descriptor and ST audio isoc class as a reference to build the UVC class
Thanks for the quick reply, I will take a deeper look at your code as a guidance for my custom USB classes, do you have any kind of tips, dos and don'ts when working with the ST´s USB stack?
I will close the issue as the main question is answered :)
Depending on what you are trying to create, I have implemented a few custom classes for sensor data using libusb for the host side and there was very minimal work needed to implement the STM32 code side especially if you use a bulk endpoint. Trying to implement a class that can talk to existing drivers such as UVC you will find that the more you implement of the specification the better. I have found that implementations vary such as the Camera application in windows 10 to something like AMCap, or Audacity if talking to an audio device the more control commands you can handle the better chances your device will work on various platforms.
Most all bugs that I have encountered where control requests from the host controller and the ability to service the data in request fast enough. With HS it is more of an issue, I have a UVC class that does 720P mjpeg video at 24fps. The HS data in needs to be handled within 125us which in itself is a long period of time but I was trying to scan every byte looking for SOF and EOF using the CPU which caused a lot of problems. I re-implemented it using DMA double buffering as well as some tricks with the vsync signal to get the processing of the Data In request down to 5us.
Thanks for the tips, I'm trying to implement the UF2 bootloader interface, Adafruit and Microsoft already have implemented it, but I'm targeting a different device, and is always 'fun' to implement something directly from the specification.
Your application sounds a lot more complex than mine, reducing the processing time from 125us down to 5us must be really hard.
Hi,
Thanks for sharing your project, is the
Middlewares\ST\STM32_USB_Device_Library\Class\UVC
source 'custom made'? I'm planning to develop some USB custom classes but i haven't find much information about it. Or is it available from STM32CubeMX?