cancel
Showing results for 
Search instead for 
Did you mean: 

How to transmit data via USB using Mass storage class - STM32H745XIH6

shashi123
Associate II

We have custom board based on STM32h745XIH6. We have configured our board to be in USB device mode operating in USB_OTG_HS (480 mbps) and registered it as Mass Storage device. The device is getting discovered as "USB mass storage device" on PC. We have a custom USB drivers for the PC side so we have changed the class to "0x00"(UsbInterface). With this the board is getting discovered as our own device specified in the USB drivers on PC.

The issue that we are facing is we are unable to transmit the data from the board(USB device) to the PC(USB Host). We have used a USB analyzer to monitor the packets to and from. Our custom GUI is able to transmit the packet from PC to board but after the first packet has been transmitted the endpoint are getting stalled and after that even if we send the data, the status register (OTG_GRXSTSP) is recognizing the packet as setup packet not data packet.

It would be really helpful if someone shared any method to transmit and receive the data via USB

1 REPLY 1
Sarra.S
ST Employee

Hello @shashi123​,

Please refer to this USB MSC device MOOC training and check those examples on GitHub.

Hope that helps!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.