I bought a STM32H747i-DISCO board to learning USB HOST to drive a camera, I found the usb host is very unstable, every is fine except suddenly dropout which meanings the port disabled, I debug and struggle for months with no nothing solved. the USB HOST2.0+ULPY program used freeRTOS V10.3.1 with TouchGFX 17.0, I believe two of them has no side effects with usb host problem what I found is:
why? what I missed?
at first i would assume a problem with the power supply.
feed the DISCO board with some 5V from a standard 5V 3A charger or other stable 5V source - and see.
set jumpers as needed and connect charger to mains as last connection (to avoid the charging capacitive from mains->charger to kill something, USB ports dont like charge, when plugged in...)
thank Ascha.3 for your precious experience, I remember I use a DC linear power supply to power DISCO, and change the DC output to standard 5V(usb port of PC normally about 4.7V)， jumps also changed to select power source, Its hard to say things changed better, and I also use a mobile charger 4.6V/5A, sometime good but have limit effect. the more effect come from change VBUS cap from 10uF(for device) to 120uF(for host). after do many test, I choose use two USB port, one for STLINK V3, one for power the usb3320 phy, I guess it is a hardware bug, I don't know it comes from usb3320 or stm32h7, can't reconnet is really hard to design any good fault tolerant product.
>> when STLINKV3 is NOT connected, usb dropout is GONE!<<
is quite obvious indicating : STLINK V3 is creating some problem, only 2 reason are there:
so more low impedance (ceramic) caps close to board (i would try some 10uF X7R SMD caps), maybe also on usb3320 vcc close to chip. and a good 5V source of course.
and good ground connection is also mandatory, >200mV spikes can introduce errors; so try to avoid ground loops also (maybe test: just disconnect STLINK V3 GND wire)
thank AScha.3, Yes, your hint is quite helpfull for me, I have observed that power ripple make usb dropout by oscilloscope in single trigger mode, when the ripple suddenly rise up to trigger a snapshot, the usb connection dropout immediately, this is obviously a evidence, but only once to observed that, so I still believe there must be some reason else. I totally agree with STLINK V3 debug action may the main cause of faut, but I have no evidence right now, the STLINK V3 is Integrated on DISCO, so I cannot disconnect GND loop right now, I'll make some test in future.