AnsweredAssumed Answered

USB VCP problem

Question asked by Przemysław Krogulec on Oct 13, 2017
Latest reply on Oct 17, 2017 by Przemysław Krogulec

I'm using stm32 Workbench with CubeMX and STM32F4DISCOVERY with STM32F407VG microcontroller
I setup everything in CubeMX as default:
- RCC-> Crystal/Ceramic Resonator

- SYS->SerialWire with SysTic Timebase Source
- USB_OTG_FS-> Device_only
- In MiddleWares, USB_DEVICE-> Communication Device Class (VCP)
- I setup Clock Configuration with input frequency 8 MHz HSE and 168MHz HLCK
- In Configuration: USB_OTH_FS Configuration i disable Vbus sensering
- In USB_DEVICE Configuration is setup as default 
Everything compile without any problems and errors.
When I connect my stm to PC, microcontroller log as COM port.
I send messages to PC with CDC_Transmit_FS function.
I receive messages on PC with HTerm program.
HTerm show this COM port normally.
When I try click connect button in HTerm, program don't connect with COM port and shows error:"Error in OpenPort: Internal error when initializing COM4".
But in some situations (sometimes when I rebulid code, but not often), I can connect with this port and I can receive messages from stm- but not every time.
When connect with this com port and I click connect and disconect buttons several times COM port has an error describe above.
This problem shows up when I using Windows 10 Pro system, but when I use Windows 7 Proffesional system this problem problem never occurred