cancel
Showing results for 
Search instead for 
Did you mean: 

USB-MIDI driver for STM32F042

ESing.1
Associate

Hello,

I am having no success in writing a USB-MIDI driver for STM32F0xx MCUs. Specifically, I am using an STM32F042K6, with STMCubeIDE. With a lot of fiddling with memory parameters, I have been able to get generated CDC and Audio Class middleware working under both Windows 10 and Mac

Starting with a working base code (usually, the Audio middleware; occasionally CDC), I have changed descriptors and relevant methods to conform to MIDI, following the standard outlined in https://www.usb.org/sites/default/files/midi10.pdf.

I've gotten as far as getting the device to show up in Windows 10 Device Manager as a sound device, but it is failing with a Code 10 error. I have gone to the extent of deleting all USB devices, rebooting and changing VID/PID in my code (so Windows is not looking for old drivers).

I've finally been able to capture a trace with a USB sniffer (shown below). It seems to be enumerating properly (though I am not sure, as I am not a USB expert). However, after that point, the Dev Mgr shows it as unworking, with a typical Code 10 error.

Any guidance would be massively appreciated.

Thanks,

Eric

0 REPLIES 0