UAC2.0 on STM32

Hello! I am trying to make USB Audio class 2 device based on STM32 MCU.
Hardware: a board with STM32F722 and external USB HS PHY.
Software: USB Audio class 1 example from ST as a base. I changed USB desctriptor and add code for new entites requests and made board work in HS mode. But in device manager in Windows the device appears with exclamation mark. USB Descriptor analyzer shows no errors. USB traffic analyzer shows no errors. But after some actions on the bus - IOCTL_USB_GET_DEVICE_CHARACTERISTICS (ioctl 0x00220480) 134, 135 positions in log - the device gets "Surprise Removal". Investigating MCU software by means of debugger ended up without any certain results: application is running, no faults detected.
I am confused by this situation and do not know what further steps I should take to get the device enumerated properly. Any help would be much appriciated.
UAC2.0_surprise_removal.jpg
 
Thank you for reply. Yes, I definitely missed something I cannot find out. Moreover, I have another UAC2.0 device that is enumerated properly. I compared two USB logs - of my not working device and of a working one - they are absolutely the same except for behaviour after positions 134, 135: not working device gets "Surprise Removal" and the working one gets endpoint reguests and ends up enumeration properly. Something wrong happens with IOCTL_USB_GET_DEVICE_CHARACTERISTICS (ioctl 0x00220480). But how can one detect what exactly is happening here? As I understand during IOCTL_USB_GET_DEVICE_CHARACTERISTICS host does not send requests to device. Instead it gathers information from internal PC USB hubs.
 
I have just took a look into Event Viewer. It registered error: source - usbaudio2; Event ID - 16.

Error description: "A system call failed. The specific status code is contained in this event."

Event data:
Words
0000: 00000000 00000001 00000000 C0440010
0010: 00000000 C000028C 00000000 00000000
0020: 00000000 00000000

Bytes
0000: 00 00 00 00 01 00 00 00 ........
0008: 00 00 00 00 10 00 44 C0 ......DÀ
0010: 00 00 00 00 8C 02 00 C0 ......À
0018: 00 00 00 00 00 00 00 00 ........
0020: 00 00 00 00 00 00 00 00 ........

Investigating...
 
I did not manage to decode log by TMF files as described on the link. I tried all of them and always the same error appeared:

"UAC2_log.elf"
+ CategoryInfo : ParserError: ( : ) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

It is like the TMF files are old and incompatible with current Windows version.
In device manager problem state is 0xC000028C. That is another mysterious number.
 
Actually I could not even manage to get "tracefmt.exe" from Microsoft. I have Visual Studio installed, but "tracefmt.exe" is not with it as it is said on Microsoft docs. I installed "Windows Kits 10". But again, "tracefmt.exe" is not with it. Finally, I found "tracefmt.exe" somewhere on the Internet.
 
I have been experimenting some time, and now got the following situation. I get the error described above when "tracefmt.exe" is launched from not system disk. When it is placed in " C:\Windows\system32\" I am faced with another situation:

1670527204647.png


Anyway log file is always generated (attached).
 

Attachments

  • UAC2_log.zip
    13.4 KB · Views: 71
Thank you very much! I managed to decode log file.
You were right about proper response for sampling frequencies request: frequenies bytes were disordered. Now the device is enumerated without exclamation mark and appears in sound devices list. But it is not working yet :).
Thank you for your time!