Hey,
I'm working on a USB microphone using an isochronous endpoint. Although 8 bits would be sufficient resolution, it turns out that Windows' standard USB driver only supports 16 bit PCM or higher.
In going from:
0x01, // bSubFrameSize 0x08, // bBitResolution
to
0x02, // bSubFrameSize (two bytes per subframe) 0x10, // bBitResolution (16 bit PCM)
... it seems something breaks. Attempting to start recording the device in Windows yields an uninformative 'cannot start' error. Using arecord -f S16_LE in Linux works fine.
The EP ISR is really simple, and just returns 16 bytes every time (sample rate 8 kHz, one channel, two bytes/sample = 16 bytes). Thus, the ENDP1 TX count is always equal to 16:
void EP1_IN_Callback(void){ SetEPTxCount(ENDP1, 16); ToggleDTOG_TX(ENDP1); SetEPTxValid(ENDP1); }
Finally, note that I'm still on single buffering (double buffering would be next after this issue is fixed). The device is an STM32F103.
Much obliged for any pointers.
Hi,
May I ask you which stack and OS did you used for this application ?
I tried with the USB FS V4.0 from ST but I still get a yellow mark in my configuration windows (code 10) I'm working on a stm32f103 and windows7 (However it works well on windows XP...)
Thanks for reading !
Théo