# What USB class should I implement?

I'm playing around with STM32F4 Discovery board and libopencm3. I want to send data acquired from ADC channels over usb and display some charts on the computer. After doing some research on USB class codes I'm a bit confused: which one should I choose for my application? At first I was thinking that USB-CDC it the way to go, since it's easier to implement but I don't think that it's the optimal solution.

• ADC? Try USB Audio. Makes it way easy to access from many applications. – Passerby Jul 19 '14 at 1:03
• From what I understand USB audio requires a defined sample rate. Will it cause problems if I choose a sample rate faster than 196kHz? – Ashton H. Jul 19 '14 at 1:15
• I would say HID, purely from a "it sounds right" POV. – Ignacio Vazquez-Abrams Jul 19 '14 at 1:59
• A single isochronous transfer can carry 1024 bytes, and can carry at most 256 samples (at 24/32 bits). This means that a single isochronous endpoint can transfer 42 channels at 48 kHz, or 10 channels at 192 kHz (assuming that High Speed USB is used - Full Speed USB cannot carry more than a single stereo IN and OUT pair at 48 kHz). see edn.com/design/consumer/4376143/Fundamentals-of-USB-Audio – Passerby Jul 19 '14 at 2:15