cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 USB Virtual COM unresponsive after reset or firmware upload

Xtek.1
Associate II

I'm using System Workbench, generated project from CUBEMX.

When I try to compile the code and flash the controller, I must manually disconnect the USB cable from the STM32 controller then plug back after the controller has started running to get functionality on a terminal program.

I was reading the reference manual and some online forums, the OTG_FS_DCTL register has to be set then reset at the SDIS bit to force soft disconnect. However, I couldn't find any references to the declaration of that said register within System Workbench.

Even though Windows needs to re-enumerate connected devices, can't the controller just force the port to be disconnected then reconnected after some delay? If yes, how can I manipulated this through system workbench?

Thanks

1 REPLY 1
TDK
Guru

You can deinitialize the USB peripheral for a bit, then reinitialize it to force a re-enumeration. There is probably an easier way, maybe the DCTL register you mentioned.

OTG_FS_DCTL  is "USB->DCTL" in the stm32f10xxx.h include file.

If you feel a post has answered your question, please click "Accept as Solution".