AnsweredAssumed Answered

USB disconnect without pullup circuitry

Question asked by Tormod on Aug 26, 2012
Latest reply on Aug 27, 2012 by Tormod
The device has a fixed pullup on D+ (1.8k resistor to 3V). In software I am switching back and forth between a USB DFU bootloader and a non-USB application. My problem is that after returning to the bootloader, it is stuck waiting for the USB connection to come up and I have to replug the USB cable or power cycle the device in order to continue. It is this manual intervention that I would like to get rid off.

The host still "sees" the DFU device after the jump to the application, and it does not reenumerate the device at any point. So how can I force this reenumeration without pullup circuitry?

I have tried USB reset from the device (CNTR_FRES) and shutting down the USB (CNTR_PDWN) like in the PowerOff() functions in ST's USB libraries but the host does not react to it.

In the "stdio via USB virtual COM port" thread Niksa suggests controlling the pin using GPIO and force it down against the pull-up but following up, lanchon warns against hacks that might damage the STM32. Is the USB analog tranceiver more robust than the GPIO, so that by disabling the USB peripheral and having GPIO_A active, there is a larger risk of hardware damage? I am studying Figure 13 and Table 29 in the RM0008 reference manual but I am not sure I get the full picture. Is the USB peripheral connected like an alternate function input/output?

Does anyone have a suggestion how I can do this in a safe way? "Safe" as in not destroying hardware, reliability of operation is less important.