cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with STM32F4 USB bulk transfer (MIDI)

ron239955_stm1
Associate III
Posted on December 07, 2012 at 18:47

Hi all,

I'm working on an application for the STM32F4 where I need a USB MIDI device class. I've started with the STM USB library and, looking at the CDC and Audio class examples, have come up with a MIDI device that runs on the OTG FS core. It successfully goes through enumeration and is recognized by the connected computer as a MIDI device.

The problem comes in when I try to send data (an IN transaction). I have traced this through all the way to the USB_OTG_WritePacket routine, where it writes data to the endpoint's transmit FIFO. I am writing a valid MIDI packet to the FIFO (0x0b 0xb0 0x3f 0x7f), but the moment the FIFO is written, the output on the bus (monitored with a USB analyzer) is something completely different (0x4a 0x4a). I've checked how the registers to make sure it has the correct transmit size, FIFO number, etc. but can't for the life of me figure out how the outgoing data is so different than what's being placed in the FIFO. 

Does anyone have any experience with this? Any tips on what to look at would be most appreciated.

 

#stm32f4-usb-midi
11 REPLIES 11
a60141
Associate II
Posted on November 29, 2015 at 20:31

Can someone please point me in a direction on to to implement the bulk transfers? Ive read the USB MIDI but Im completely lost on how to implement this...

fo
Associate
Posted on July 05, 2016 at 00:20

Dear Tsuneo,

I try to implement MIDI device interface on STM32F7-disco board. I found your post  that is a couple of years old. Is there a chance that you could complete your tutorial?

Best regards,

Fatih