No data actually being sent on Iso IN transfer with STM32F429 and USB3320 PHY in HS mode?
For the last week, I've been trying to get asynchronous USB Audio 2.0 to work.
I have dissected the descriptors from a Focusrite Scarlett 2i2 and crafted my own with the usb audio 2.0 docs at hand. I've modified the CubeF4 audio example and kept most of the scaffolding in tact.
Thus far, my device device enumerates as a High Speed device, shows up and I can also stream audio to it, great! The OUT endpoint is working for the output channels, but the IN feedback endpoint does not.
The tricky thing with the feedback endpoint is that the host sends a IN transfer to poll it every 8 microframes (= 1ms). Because I don't know at which frame (odd or even SOF number) the host will first request the feedback value, I have the following trick:
- Prime the feedback endpoint with 1st feedback value when the interface is first opened (alt_setting = 1) by calling USBD_LL_Transmit().
- IsoINIncomplete callbacks are made for every frame that the host didn't poll the data. Every time this happens, I flip the odd/even frame in the DIEPCTL register.
- Eventually, the host inits a IN-transfer, the primed packet is sent and my transfer complete callback is called. In the callback, I prime the endpoint with a new feedback value and the cycle resets.
I'm pulsing GPIO pins for the various callbacks and with a logic analyzer I can see the various callbacks being made when playing audio.
With Wireshark, I can see the the IN-transfers being submitted, but no data is ever actually received, despite transfer complete interrupts telling me otherwise.
I've tried just about everything I can think of. Including enabling the DMA, but then no transfer complete interrupts are generated, although I think this is by design.
I double checked the Wireshark results by capturing a session with the Scarlett 2i2, here I can clearly see the feedback endpoint data arriving.
I also updated to the latest version of the CubeF4 package, no luck.
I get the feeling this is a problem with the ISO IN-transfers in general, as enabling the audio-input IN-endpoint, one that *does* gets polled every microframe, also doesn't send any data to the host.
Any help here?
