我使用的是adafruit STM32F405羽毛,并在stm32cubeide中为其编写了一个程序。我已经启用了USB_OTG_FS
,并在中间件下的USB_DEVICE下选择了VCP。我在我的main.c
文件中使用CDC_Transmit_FS()
发送了一个简单的消息。我想然后使用minicom显示消息,但是当我插入时,stm32f405不被识别为虚拟com端口。请问有人能帮忙解决这个问题吗?
这是我从dmesg
得到的
[13875.812682] CPU4: Package temperature/speed normal
[13875.812714] CPU7: Package temperature/speed normal
[13875.812714] CPU3: Package temperature/speed normal
[13991.385412] usb 1-1: new full-speed USB device number 7 using xhci_hcd
[13991.535289] usb 1-1: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[13991.535296] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13991.535299] usb 1-1: Product: STM32 Virtual ComPort
[13991.535302] usb 1-1: Manufacturer: STMicroelectronics
[13991.535305] usb 1-1: SerialNumber: 2052368B424D
[13991.537315] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[14011.512953] usb 1-1: USB disconnect, device number 7
[14011.965421] usb 1-1: new full-speed USB device number 8 using xhci_hcd
[14012.115098] usb 1-1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[14012.115101] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14012.115103] usb 1-1: Product: STM32 BOOTLOADER
[14012.115105] usb 1-1: Manufacturer: STMicroelectronics
[14012.115106] usb 1-1: SerialNumber: 2052368B424D
[14062.597167] usb 1-1: USB disconnect, device number 8
[14062.905188] usb 1-1: new full-speed USB device number 9 using xhci_hcd
[14078.380920] usb 1-1: device descriptor read/64, error -110
[14093.996841] usb 1-1: device descriptor read/64, error -110
[14094.232811] usb 1-1: new full-speed USB device number 10 using xhci_hcd
[14109.616762] usb 1-1: device descriptor read/64, error -110
[14125.228684] usb 1-1: device descriptor read/64, error -110
[14125.336733] usb usb1-port1: attempt power cycle
[14125.752659] usb 1-1: new full-speed USB device number 11 using xhci_hcd
[14130.988679] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[14132.495127] usb 1-1: Device not responding to setup address.
[14132.700624] usb 1-1: device not accepting address 11, error -71
[14142.916583] usb 1-1: new full-speed USB device number 13 using xhci_hcd
[14158.508419] usb 1-1: device descriptor read/64, error -110
它似乎是有一个错误时,读取usb设备描述符,任何想法我可以如何解决这个问题?
HAL_PWREx_EnableUSBVoltageDetector()在MX_USB_DEVICE_Init的末尾出现
我从1月更新到7月发布的IDE, MX和STM32CubeF4版本,我的USB_OTG_FS开始工作(上面的调用在最新版本中不存在)。