Cannot switch between USB device and USB host mode on STM32H7A3-nucleo without cycling power
I am using a stm32h7a3-nucleo board to do proof of concept of this MCU supporting both USB Host as a MSD and USB Device as CDC. Using code from ST sample projects, it is setup to go to host mode if user button is held after a board reset. Both host and device modes work,
If device mode is selected after reset, then later the user resets the board, and tries to put it to host mode, the device does not properly init the USB drive connection. Since both modes start after a board reset, why do I need to pull power supply from the board to get USB host to work again? It does not matter if the USB drive is plugged in or not at the time of reset.
