UF2 update over USB on STM32H743: erasing inactive Bank causes host reset, but adding a Hub helps. Why?
Hi everyone,
I'm using an STM32H743 in USB device mode as a virtual USB drive (UF2 protocol) for firmware upgrade.
-
Main program runs in Bank 1
-
Upgrade firmware is written to Bank 2
During the file copy process (from PC to the virtual UF2 disk), the USB connection drops unexpectedly (host resets the bus, captured by USB analyzer).
However, if I connect the device through a USB Hub, the success rate improves dramatically.
I understand that in dual-bank Flash architecture, erasing or programming Bank 2 should not interfere with:
-
USB peripheral operation (running from Bank 1)
-
AHB bus access
-
Interrupt latency (if properly configured)
But my test shows the opposite:
-
Direct connection → frequent host reset
-
Via Hub → mostly works fine
Questions:
-
What could cause the host to reset the bus when only the inactive Bank is being erased/programmed?
-
Why does adding a Hub improve reliability — is it signal integrity, power filtering, or host timing tolerance?
-
Could Flash write/erase temporarily block USB interrupt responses long enough to trigger a host reset?
-
Any recommended software workarounds (e.g., temporary disconnection, bulk-only transport handling, or endpoint stall before Flash operation)?
Environment:
-
MCU: STM32H743 (Dual Bank mode enabled)
-
USB: Full Speed / High Speed (both tested)
-
Host: Windows 10/Linux
-
Protocol: UF2 (MSC class)
Thanks in advance for any insights.
