Skip to main content
SKIM.6
Associate
Mar 21, 2023 2:48 PM UTC
Question

usb msc host or msc device dynamic selection.

I want to configure a USB device using STM32F746.

I want to select the USBH MSC Host and Device as needed (without rebooting..).

In CubeMX, only "Host Only" or "Device Only" can be selected.

When selecting DualRole in CubeMX, a library is not created.

I want to dynamically select and use the USBH MSC Host and Device.

Please let me know if there is a way.

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
Mar 21, 2023 8:34 PM UTC

You go from one state to other through a XXXDeInit()/YYYInit() cycle, there is no more to it.

Now how well do DeInit() for USBD/USBH work in Cube, I don't know, I don't use Cube.

JW

Piranha
Principal III
Mar 22, 2023 4:49 PM UTC

Don't waste your time on a broken bloatware and use an USB stack developed by competent people:

https://github.com/hathach/tinyusb

SKIM.6
SKIM.6Author
Associate
Mar 23, 2023 5:48 AM UTC

thanks for your advice. i'll reference your reply.