AnsweredAssumed Answered

re-enumerate USB - STM32F107

Question asked by jkwool on Nov 25, 2013
Latest reply on Nov 26, 2013 by jkwool
I have a board that is connected to USB on a STM32F107 with the following pins

USB_OTG_VBUS : PA9
USBDM : PA11
USBDP : PA12

I have a project that needs to use both Virtual Com Port and USB Mass Storage. It needs to re-enumerate the USB then do a software reset to enable the different USB class.

I have tried various different things to get it to re-enumerate but so far have been unable to, the only way to re-enumerate is to unplug usb cable.

These are some of the functions i have tried with no success
USB_OTG_DisableGlobalInt(&USB_OTG_dev);
USB_OTG_WRITE_REG32(&USB_OTG_dev.regs.GREGS->GINTSTS, 0xBFFFFFFF);
USB_OTG_CoreReset(&USB_OTG_dev);
USBD_DeInit(&USB_OTG_dev);
DCD_DevDisconnect(&USB_OTG_dev);
NVIC_SystemReset();

Would anyone have any ideas on how to get the USB to re-enumerate when it is configured with only these 3 pins for the STM32F107?

Outcomes