RadioOperator / STM32F103C8T6_CMSIS-DAP_SWO

CMSIS-DAP SWO CDC STM32F103C8T6 BluePill STLINK ARM Debugger
Apache License 2.0
377 stars 193 forks source link

usb issue on F103-DAP-SWO-CDC-BLUEPILL-SWD_PB8PB9.hex #12

Closed ntn888 closed 2 years ago

ntn888 commented 2 years ago

On: F103-DAP-SWO-CDC-BLUEPILL-SWD_PB8PB9.hex :

[ 1709.811747] usb 3-3.4.4: USB disconnect, device number 56
[ 1711.056537] usb 3-3.4.4: new full-speed USB device number 57 using xhci_hcd
[ 1711.158213] usb 3-3.4.4: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00
[ 1711.158228] usb 3-3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1711.158234] usb 3-3.4.4: Product: STM32 STLink
[ 1711.158238] usb 3-3.4.4: Manufacturer: STMicroelectronics
[ 1711.158242] usb 3-3.4.4: SerialNumber: Wÿm\x06p\xc2\x84II20\x14g
[ 1716.211775] usb 3-3.4.4: USB disconnect, device number 57
[ 1727.178894] usb 3-3.4.4: new full-speed USB device number 58 using xhci_hcd
[ 1727.280912] usb 3-3.4.4: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00
[ 1727.280927] usb 3-3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1727.280933] usb 3-3.4.4: Product: STM32 STLink
[ 1727.280937] usb 3-3.4.4: Manufacturer: STMicroelectronics
[ 1727.280941] usb 3-3.4.4: SerialNumber: Wÿm\x06p\xc2\x84II20\x14g
[ 1755.124031] usb 3-3.4.4: USB disconnect, device number 58
[ 1773.501170] usb 3-3.4.4: new full-speed USB device number 59 using xhci_hcd
[ 1773.602774] usb 3-3.4.4: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00
[ 1773.602790] usb 3-3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1773.602796] usb 3-3.4.4: Product: STM32 STLink
[ 1773.602800] usb 3-3.4.4: Manufacturer: STMicroelectronics
[ 1773.602804] usb 3-3.4.4: SerialNumber: Wÿm\x06p\xc2\x84II20\x14g
[ 1797.620282] usb 3-3.4.4: USB disconnect, device number 59
[ 1815.770359] usb 3-3.4.4: new full-speed USB device number 60 using xhci_hcd
[ 1815.850401] usb 3-3.4.4: device descriptor read/64, error -71
[ 1816.038417] usb 3-3.4.4: device descriptor read/64, error -71
[ 1816.226410] usb 3-3.4.4: new full-speed USB device number 61 using xhci_hcd
[ 1816.306460] usb 3-3.4.4: device descriptor read/64, error -71
[ 1816.494468] usb 3-3.4.4: device descriptor read/64, error -71
[ 1816.602676] usb 3-3.4-port4: attempt power cycle
[ 1817.210518] usb 3-3.4.4: new full-speed USB device number 62 using xhci_hcd
[ 1817.210717] usb 3-3.4.4: Device not responding to setup address.
[ 1817.418729] usb 3-3.4.4: Device not responding to setup address.
[ 1817.626576] usb 3-3.4.4: device not accepting address 62, error -71
[ 1817.706594] usb 3-3.4.4: new full-speed USB device number 63 using xhci_hcd
[ 1817.706793] usb 3-3.4.4: Device not responding to setup address.
[ 1817.914817] usb 3-3.4.4: Device not responding to setup address.
[ 1818.122636] usb 3-3.4.4: device not accepting address 63, error -71
[ 1818.122845] usb 3-3.4-port4: unable to enumerate USB device
RadioOperator commented 2 years ago

Hi @ntn888 , my device is USB2.0. It seems your linux USB3.0 driver problem, can not down to USB2.0 automatically. Please try to connect thru a USB2.0 Hub.

ntn888 commented 2 years ago

thanks! same in 2.0.

RadioOperator commented 2 years ago

The same device, did you try it on a Windows PC? please confirm the device working OK on Windows.

RadioOperator commented 2 years ago

How to get your log from linux? I could test it on my ubuntu.

Btw, my newest FW is using PID = 0x572A, why you got idProduct=3748 ?

ntn888 commented 2 years ago

i just did git pull... nothing else...

ntn888 commented 2 years ago
git clone https://github.com/RadioOperator/STM32F103C8T6_CMSIS-DAP_SWO
cd STM32F103C8T6_CMSIS-DAP_SWO/build
st-flash write F103-DAP-SWO-CDC-BLUEPILL-SWD_PB8PB9.hex 0x8000000
ntn888 commented 2 years ago

btw i checked in Windows 10: 'Unknown USB device'

RadioOperator commented 2 years ago

Maybe your log is not my CMSIS-DAP device, it's your ST-LINK tools. That means your ST-LINK tools not work on your linux, please use the tools on Windows PC and flash my code to stm32f103 on Windows. Please make sure CMSIS-DAP works ok on Windows first.

Then try my CMSIS-DAP on linux again.

ntn888 commented 2 years ago

okay i will try

ntn888 commented 2 years ago

works!

[19416.397775] usb 3-7: new full-speed USB device number 73 using xhci_hcd
[19416.547417] usb 3-7: New USB device found, idVendor=0483, idProduct=572a, bcdDevice= 1.00
[19416.547432] usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[19416.547437] usb 3-7: Product: CMSIS-DAP
[19416.547442] usb 3-7: Manufacturer: CMSIS-DAP by ARM
[19416.547446] usb 3-7: SerialNumber: 0001A0000000
[19416.550918] cdc_acm 3-7:1.0: ttyACM0: USB ACM device
[19416.551796] hid-generic 0003:0483:572A.0005: hiddev1,hidraw4: USB HID v1.00 Device [CMSIS-DAP by ARM CMSIS-DAP] on usb-0000:00:14.0-7/input2
ntn888 commented 2 years ago

need to see the right command to program under linux...

ntn888 commented 2 years ago

on linux: st-flash --format ihex write .hex i used the wrong command earlier...