Skip to main content
ron239955_stm1
Associate III
December 7, 2012
Question

Issues with STM32F4 USB bulk transfer (MIDI)

  • December 7, 2012
  • 11 replies
  • 4169 views
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
This topic has been closed for replies.

11 replies

fo_it
Associate II
July 4, 2016
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