cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4x STMicroelectronics Virtual COM Port is properly installed but can't start, error ''This device cannot start. (Code 10)'' WIN7 64 (FIXED!)

Sami.Oweis
Associate

Hi, in case someone else have the same issue which is Installed the WIN7 64Bits USB Virtual COM Port cant't start with Code 10,

0690X0000088SkFQAU.png

  

Software and Library versions,

  1. I am using Firmware Library "STM32Cube_FW_F4_V1.24.0"
  2. STM32CubeMX V5.0.1 and STM32Cube V1.0
  3. IAR Embedded Workbench for ARM (8.32.2.19423)
  4. IAR Embedded Workbench shared components (8.2.2.5792)
  5. Board: STM32F4VET6
  6. OS: WIN7 64Bits

To correct this, we have to fix the Endpoint IN & OUT Pakcet Size “CDC_DATA_HS_MAX_PACKET_SIZE “within the “usbd_cdc.h�? header file. 

OLD

0690X0000088SkAQAU.png

/* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
#define CDC_DATA_HS_MAX_PACKET_SIZE                 512U  /* Endpoint IN & OUT Packet size */ //<-- Change 512U to 64U
#define CDC_DATA_FS_MAX_PACKET_SIZE                 64U  /* Endpoint IN & OUT Packet size */
#define CDC_CMD_PACKET_SIZE                         8U  /* Control Endpoint Packet size */

NEW

0690X0000088SlDQAU.png

/* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
#define CDC_DATA_HS_MAX_PACKET_SIZE                 64U // 512U  /* Endpoint IN & OUT Packet size */
#define CDC_DATA_FS_MAX_PACKET_SIZE                 64U  /* Endpoint IN & OUT Packet size */
#define CDC_CMD_PACKET_SIZE                         8U  /* Control Endpoint Packet size */

Save, Recompile and Rebuild your code.

Unplug the USB and re-plug it back it for the USB port Communication recycle , not the ST-Link, the device driver should refresh, and it start working properly. 

 0690X0000088SmLQAU.png0690X0000088SmVQAU.png

Hope this helps!

Again, thanks to the ST community for their support, and thanks to Eichel.Dirk for his previous solution which inspired me to this method.

0 REPLIES 0