Skip to main content
Associate II
January 26, 2024
Solved

ST Link Virtual Com Port - USBD_CDC_Init() never called

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
 
This topic has been closed for replies.
Billy OWEN
Billy OWENBest answer
ST Employee
January 29, 2024

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

1 reply

Billy OWEN
Billy OWENBest answer
ST Employee
January 29, 2024

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