AnsweredAssumed Answered

STM32F4 USB Virtual Com Port weird problem/settings solved?

Question asked by Christoph Eschenbach on Jan 30, 2017
Latest reply on Jan 31, 2017 by Christoph Eschenbach

Hey there,


I am trying to put up a VCP for Nucleo144 STM32F429 and had hard time figuring out why i cannot connect with my Terminal Program board with the CubeMX generated Sourcecode.

I dont know why but this worked for me now:


In CubeMX:

   Board Selection->STM32->Nucleo144->F429ZI

Pinout Tab:


      USB_OTG_FS->Device Only

      RCC->Enable HSE->Bypass


   Enable USB_DEVICE->Communication Device Class(Virtual Com Port)

Clock Configuration:

   PLL Source Mux: HSE 8MHz         /M= 4, *N = 168, /P = 2, /Q =7

   System Clock Mux: PLLCLK-> 168MHz

   APB1 peripheral clocks 42 MHz

Configuration Tab:

   Connectivity->USB_FS->Parameter Settings->VBUS Sensing-> Disabled

   Project Settings->Linker Settings:

   Heap from 0x200 to 0x2000

   Stack from 0x400 to 0x600

Project Settings

In IAR Embedded Workbench:

      USB_HS_MAX_PACKET_SIZE  from 512 to 256

      CDC_DATA_HS_MAX_PACKET_SIZE from 512 to 256

      (this doesnt really affected the problem so i changed it back to 512 since im using FS-mode)


Still I cannot connect via a Terminal from Host PC.

So i searched and now this happens:

   Back in CubeMX taking a harder look at USB_DEVICE in Configuartion Tab.

   I changed USBD_MAX_STR_DESC_SIZ the default 512 to 64 bytes, because description says between 1 and 64. Why    default is 512 then?

->Still cannot connect.

   Changed USBD_DEBUG_LEVEL to 3.

I finally can connect to device via Terminal.

I will try to rebuild this scenario tomorrow to see if this option really making me that trouble.

Could these settings have such impact on the right configuration?