cancel
Showing results for 
Search instead for 
Did you mean: 

ST Link Virtual Com Port - USBD_CDC_Init() never called

SonoClock110
Associate II

Hi together,

I'm trying to use the ST Link Virtual Com Port on a STM32H745 DISCO board. For this I created a project with the CubeIDE and configured it as explained on many websites and YouTube clips.

I also see ST Virtual Com Port in the windows device manager (and also the ttyACM0 on a Linux machine).

 

In the main() I call the MX_USB_DEVICE_Init() and in a cyclic thread I call the CDC_Transmit_FS() to sent some bytes. But in the CDC_Transmit_FS() the 

hcdc->TxState in
if (hcdc->TxState != 0){ ... }
will never be 0.
 
After some debugging I found that the function USBD_CDC_Init() is never called. I get interrupts for the USB and HAL_PCD_IRQHandler() is called but never reach the 
/* Handle Enumeration done Interrupt */
if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_ENUMDNE))
It stucks in the 
/* Handle Suspend Interrupt */
if (__HAL_PCD_GET_FLAG(hpcd, USB_OTG_GINTSTS_USBSUSP))
part.
 
Do you have any idea whats going wrong here?
Thanks!
Christoph
 
1 ACCEPTED SOLUTION

Accepted Solutions
Billy OWEN
ST Employee

Hi @SonoClock110 

 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

 

Regards,

Billy

View solution in original post

1 REPLY 1
Billy OWEN
ST Employee

Hi @SonoClock110 

 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

 

Regards,

Billy