AnsweredAssumed Answered

STM32F4 Cubemx USB CDC VCP Issue and possible solution.

Question asked by alvarez.raul on Apr 30, 2016
Latest reply on Jun 30, 2016 by FTITI.Walid
Hi to all, 
I have STM32F4 Discovery board, CubeMx 4.14 version.
I made an empty project with USB Full Speed VCOM port. And I tested both in Linux and Windows. All compiles OK, but...

 1.- In Linux I was having this error (see kernel messages):

[66654.903832] usb 1-2: new full-speed USB device number 37 using xhci_hcd
[66655.070466] usb 1-2: New USB device found, idVendor=0483, idProduct=5740
[66655.070471] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[66655.070473] usb 1-2: Product: STM32 Virtual ComPort
[66655.070476] usb 1-2: Manufacturer: STMicroelectronics
[66655.070477] usb 1-2: SerialNumber: 00000000001A
[66655.071569] usb 1-2: can't set config #1, error -32
[66655.706762] usb 1-2: reset full-speed USB device number 37 using xhci_hcd
First of all, I has made plenty of test, the last line seems not always appear ... 

2.- In windows machine (not virtualmachine) 
I have (with properly installed VCP driver) "SGS Thomson STM32 Virtual ComPort" as COM15
If I try to open, hyperterminal repots that it can't open. 

After lot tests, and looking into forums, I saw into this forum this post USB CDC problem, so I decided to increase the heap size to 0x0400, and then voila, Linux created /dev/ttyACM0: 

[70374.911527] usb 1-2: new full-speed USB device number 41 using xhci_hcd
[70375.077919] usb 1-2: New USB device found, idVendor=0483, idProduct=5740
[70375.077925] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[70375.077928] usb 1-2: Product: STM32 Virtual ComPort
[70375.077931] usb 1-2: Manufacturer: STMicroelectronics
[70375.077933] usb 1-2: SerialNumber: 00000000001A
[70375.115166] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[70375.115911] usbcore: registered new interface driver cdc_acm
[70375.115913] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

I didn't try in windows yet nor USB transmission. But it seems to fix the issue. 
So my question is? Does anyone experenced this problem and fix it by other ways? 

Thanks.


Outcomes