cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB OTG HS in FS mode.

tpate.17
Associate

I'm using STM32f4 mcu , I need to configure USB OTG HS in FS mode. Can I get an example code for usb otg hs or fs

3 REPLIES 3

Have you used STM32CubeMX?

Yeah..I have configured USB_OTG_HS speed as Full speed 12MBit/s.. But I don't know how to send or receive data from PC..What is the basic code for it...I need a sample code.

Pavel A.
Evangelist III

Since a PC is normally a host, STM32 needs to be a device. You have choice: HID or "virtual COM port" or something custom, using for example, WinUSB [1]. Whatever you prefer.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/automatic-installation-of-winusb

-- pa