Skip to main content
csotiriou
Associate
February 27, 2021
Solved

USB CDC does not work when I unplug and replug STM32

  • February 27, 2021
  • 1 reply
  • 1126 views

I'm using the Nucleo-H743ZI STM32 development board on windows 10. When I upload a program that sends out data through CDC with CDC_Transmit_FS and open a serial monitor right after, it works fine. But when I disconnect and reconnect the Nucleo to my computer the serial port cannot seem to be able to open. In Putty I get unable to configure serial port. This only happens when I unplug the ST-Link side of the nucleo. My code is very basic and shown below:

 while (1)
 {
 /* USER CODE END WHILE */
 
 /* USER CODE BEGIN 3 */
	 CDC_Transmit_FS((uint8_t *) "AAAAAAAA\r\n", 10);
	 HAL_Delay(100);
 
 }

What do you think is the problem? 

Thank you.

    This topic has been closed for replies.
    Best answer by csotiriou

    I found a fix in the following thread, in the answer from @Ant M​ 

    https://community.st.com/s/question/0D50X00009Xke3ESAR/usb-vcp-windows-10

    1 reply

    csotiriou
    csotiriouAuthorBest answer
    Associate
    February 27, 2021

    I found a fix in the following thread, in the answer from @Ant M​ 

    https://community.st.com/s/question/0D50X00009Xke3ESAR/usb-vcp-windows-10