2020-05-15 02:39 AM
Our product uses the embedded USB PHY and only initialize the USB CDC when needed. Any other time we keep it de-initialized. At initialization the tranceiver is enabled through HAL_PCD_Init() that uses the function USB_CoreInit(). When de-initialized with HAL_PCD_DeInit() the tranceiver is not placed in powerdown (PWRDWN bit in register OTG_GCCFG).
The PWRDWN bit should be reset in the method HAL_PCD_DevConnect().