你看下这个寄存器 OTG_FS_DCTL的@SDIS位的描述,以及下面的文字:
Soft disconnect
The powered state can be exited by software with the soft disconnect feature. The DP pullup
resistor is removed by setting the soft disconnect bit in the device control register (SDIS
bit in OTG_FS_DCTL), causing a device disconnect detection interrupt on the host side
even though the USB cable was not really removed from the host port.