2017-10-20 09:51 AM
Hi, I'm attempting to make a usb audio device using an stm32f042. I have managed to prototype the same basic concept using an F4 discovery, but the same code (with some changes and new CubeMX autogenerated parts) fails on F042.
The failure occurs soon after the device is connected to PC, during enumeration. The PC tries to set configuration 1, and the device replies with error.
I have attached a screenshot from a usb analyser. Can anyone advise where to look?
2017-10-23 06:43 AM
ok an update: the configuration is actually set correctly, but the following transactions give an error.
I've tried debugging the device and it seems that device class functions such as USBD_AUDIO_Init are never called, but USBD_RegisterClass(&hUsbDeviceFS, &USBD_AUDIO); is called.
I'm out of ideas at this point and would appreciate any ideas for where to look (even if they are completely random!)
Same code works fine on F4discovery.
2017-10-23 06:45 AM
just a note - when I say following transactions I mean the ones in the original screenshot. The screenshot is from vusb-analyzer, which seems to have the wrong endianess so sees configuration 1 as 256.