AnsweredAssumed Answered

Issues with STM32F4 USB bulk transfer (MIDI)

Question asked by radicals on Dec 7, 2012
Latest reply on Jul 5, 2016 by ozansoy.fatih
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.






 

Outcomes