2014-01-31 06:38 AM
Hey guys,
I am already running an application with USB in VCP mode, and I developed a circuit, that would rise voltage on boot0-pin to enter the bootloader after a reset is done trough the watchdog... My problem is that I have to disconnect the USB-plug to get the device detected in DFU mode after the watchdog did a reset. So my idea is to configure the UBS D+ and D- pins as outputs, and pull them low shortly before the reset... Unfortunately just defining them as output does not work. I also tried to reset the peripherial clocks, but it would not work. Any ideas how I can felicitate this software driven usb-disconnect? thanks and best regards!2014-01-31 08:17 AM
Hi
You can fake a USB disconnect // set bit SDIS in OTG_FS_DCTL reg USB_OTG_dev.regs.DREGS->DCTL |= 0x02;2014-01-31 09:59 AM
Hey, thanks!
I just gave it a try, but it's not working yet. The device disconnects, but it does not reconnect in DFU-Mode, still have to toggle the plug. Any further ideas?Hi
You can fake a USB disconnect // set bit SDIS in OTG_FS_DCTL reg USB_OTG_dev.regs.DREGS->DCTL |= 0x02;2014-01-31 10:30 AM
Hi
''and I developed a circuit, that would rise voltage on boot0-pin to enter the bootloader after a reset is done trough the watchdog...'' '' The device disconnects, but it does not reconnect in DFU-Mode, still have to toggle the plug. Any further ideas? '' So the soft disconnect works. After the reboot, are you sure your circuit pulls the boot0 pin(s) high? Are you sure it is running the built in DFU code? Once it starts the built in DFU code - you are in the hands of the built in code.