USBDevice working on DISCO_H747I?


cross-posting from github issues - not sure which one is the right location for a supported target issue post.

Any operation on DISCO_H747I to operate the USBDevice (e.g. USBSerial) seems to not produce any effect.
Adding DEVICE_USBDEVICE to config makes the compilation go all fine, there seems to be support for USB in all the target header files but the device doesn’t produce the expected output.

E.g. An USBSerial snippet compiles and runs fine, but no VCP device appears on the host PC.
Adding e.g. non-blocking connection and calling serial.connect() passes just fine, but does nothing.

Was the USBDevice peripheral tested on this target?

The very similar target PORTENTA_H7 seems to have DEVICE_USBDEVICE declared - I assume that one is working?

Any help would be appreciated!


I think I had similar behavior when I did not have the right options set in my mbed_app.json. I am using the med CLI, though, so I do not know how to set this up in other toolchains.

The options I have added to enable USB Device drivers are the following:

  • In the config section:
"usb_speed": {
    "value": "USE_USB_OTG_FS"
  • In the target_override section:
"target.device_has_add": ["USBDEVICE"]

With both settings I can use all available USB Device drivers.

Right, that’s basically what I did as well.
Did you get it working on the same target?