cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio on USB HS issue (cannot transmit data using ISO IN EP)

Tomas Jirinec
Associate II

Hello,

I am having issue implementing USB Audio using the USB HS peripheral on STM32F767II.

Basically everything (enumeration, various control transfers (volume/mute), playback) works except recording. Specifically I am having trouble transmitting samples using the isochronous IN endpoint.

What I do:

  • I call USBD_LL_Transmit to enqueue 96B of data to TX FIFO. MaxPacketSize is 96B. 1ms worth of samples (48kHz, mono, 16 bits).
  • If ITTXFE happens - I disable the endpoint, flush the FIFO and call USBD_LL_Transmit with next batch of samples.
  • If only IISOIXFR happens, host has not sent IN token. Interval in EP descriptor is set to 1ms, on HS one microframe is 1/8ms, so this will happen 7 out of 8 times. I just flip the EONUM bit in DIEPCTLx (using SODDFRM and SEVNFRM bits) to arm the EP for next microframe.
  • Eventually I get XFRC (transfer completed) and I move on to next 96B of samples.

Everything looks ok (XFRC asserts each 1ms) but the host does not receive any data (looks like only zero-length-packets are coming). The PKTCNT and XFRSIZ in DIEPTSIZx are both zero when XFRC asserts. But what looks very weird to me - the DTXFSTSx immediately after the XFRC tells that only 5 words (20B) are available. The TX FIFO for this EP is set to 25 words (100B). After XFRC should it not be empty? I.e DTXFSTSx == 25?

Any ideas would be welcomed.

3 REPLIES 3
Owen.Xiao
Associate

I'm having meet the same issue.

Did you resolve the issue already?

Thanks,

Owen.

Hello,

I have been working on other things and came back to this today.

I am trying to make it work on simplified setup (stm32f746g-disco, no rtos, microphone only).

timistof
Associate III

I realise this is an old thread, but I'm running into this as well (link), although on a F4 with external HS phy. I thought the issue was maybe related to the usage of the external phy.