cancel
Showing results for 
Search instead for 
Did you mean: 

cubemx + usb vcp and stm32f4?

John Doe1
Associate III
Posted on February 24, 2017 at 17:51

hey,

I tried to run usb hs + vcp with code created by CubeMX.

In generated code i have changed:

#define APP_RX_DATA_SIZE 64

#define APP_TX_DATA_SIZE 64

and included in main.c:

#include 'usbd_cdc_if.h'

also changed:

Stack_Size EQU     0x00004000

Heap_Size      EQU     0x00002000

and no luck at all. When pluging in usb cable i got message in linux:

usb 1-1: new full-speed USB device number 80 using xhci_hcd

usb 1-1: device descriptor read/64, error -71

usb 1-1: device descriptor read/64, error -71

usb 1-1: new full-speed USB device number 81 using xhci_hcd

usb 1-1: device descriptor read/64, error -71

usb 1-1: device descriptor read/64, error -71

usb 1-1: new full-speed USB device number 82 using xhci_hcd

usb 1-1: Device not responding to setup address.

usb 1-1: Device not responding to setup address.

usb 1-1: device not accepting address 82, error -71

usb 1-1: new full-speed USB device number 83 using xhci_hcd

usb 1-1: Device not responding to setup address.

usb 1-1: Device not responding to setup address.

usb 1-1: device not accepting address 83, error -71

usb usb1-port1: unable to enumerate USB device

Under Windows it recognizes as wrong device (it's not related to driver)

any hints how to run usb hs with vcp?

thanks!

This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
gbm
Principal
Posted on February 27, 2017 at 11:48

Check the Configuration tab, USB_OTG_FS Configuration, VBUS sensing - must be set do Disable. I don't really know why CubeMX sets it to Enable by default.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

View solution in original post

3 REPLIES 3
allard
Senior
Posted on February 24, 2017 at 20:01

Maybe a hardware problem? Does another USB class work?

Posted on February 25, 2017 at 16:57

unfortunately no, tried three different boards on the different computers.

gbm
Principal
Posted on February 27, 2017 at 11:48

Check the Configuration tab, USB_OTG_FS Configuration, VBUS sensing - must be set do Disable. I don't really know why CubeMX sets it to Enable by default.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice