I'm getting a bunch of errors when trying to connect my DS-5 session to the Vybrid target over the USB CMSIS-DAP connection:
Sep 16 16:41:59 ubuntu32 kernel: [ 1593.352279] usb 2-2.3: usbfs: USBDEVFS_CONTROL failed cmd browse_cmsis_da rqt 128 rq 6 len 255 ret -110
Sep 16 16:42:09 ubuntu32 kernel: [ 1603.363434] usb 2-2.3: usbfs: USBDEVFS_CONTROL failed cmd browse_cmsis_da rqt 128 rq 6 len 255 ret -110
etc etc forever.
When this happens, I cannot connect to the target to download and debug code. Also, trying to use the Connection Browser causes the exact same results - I get all those errors in the syslog and the Connection Browser remains blank.
The weird thing is that it will behave like this for most of a day then suddenly start working.
Other than this, about half the time, I cannot connect and sometimes have to cycle power or just soft reboot the Vybrid tower in order to connect. Sometimes (but rarely) I have to reboot the development host to get it to work. I've had to live with this for the last year....
I've tried reflashing the firmware in the K20. I most recently used the K20 CMSIS-DAP firmware mentioned in this thread: Updated CMSIS-DAP application
Does anybody have an idea why this is happening? Sometimes this happens for hours on end and I can't get anything done.
It seems to me that either the CMSIS-DAP protocol or the P&E firmware isn't mature and is full of bugs....
Thanks
Hi Jack,
I can't disagree.
OK, it's Linux (I know, but others could wonder are you using Windows or Linux), but how do you run it? Is it real Linux PC or some kind of virtual machine? I need to use Windows and run Ubuntu in VM.
VMware: Vybrid Tower card CMSIS-DAP works if you switch USB to USB 1.1 mode. Setting USB to 2.0 mode makes you unable to use CMSIS-DAP and produces a lot of messages like you.
On real machine you may need EHCI or some other USB 2.0 host driver compiled as module, removing it perhaps should help. Using VMware it is just a couple of mouse clicks.
Virtual Box: works well out of the box, but I didn't try to install any extensions and I think that without them VBox works in USB 1.1 mode, which works well with CMSIS-DAP.
OT: On VMware for some reason it is not possible to use Linux TFTP server, which connects to the world via my laptops WiFi. Wired TFTP server works, but I want to use wire for tower connection and WiFi for wireless connection to the rest of world. Perhaps driver problem, perhaps VMware issue, I don't know. Good think is that you don't need to reinstall Ubuntu in VM to switch to / from Virtual Box, disk images are compatible.
Virtual Box for some reason doesn't allow drag&drop from guest Linux to host Windows. Perhaps just my PC.
Edward
I tried disabling the VM's USB adapter's 2.0 functionality (unchecked "Enable high-speed support for USB 2.0 devices") and it still has trouble connecting. :smileysad: :smileysad:
Oh well.
Hi Jack,
I don't know "Enable high-speed support for USB 2.0 devices" setting in VMware, perhaps it's different version. In guest machine settings please go to Hardware -> USB Controller -> USB compatibility and try setting it to USB 1.1.
Also it is not clear, do you still have trouble due to messages like
usb 2-2.3: usbfs: USBDEVFS_CONTROL failed cmd browse_cmsis_da rqt 128 rq 6 len 255 ret -110,
and have problems detecting CMSIS-DAP in DS-5 debugger settings? DS-5 detects CMSIS 1 out of 10 or so detection attempts. If so, then it's worth trying VirtualBox. It works for me on two machines, desktop and laptop, both using I5-4xxx CPU's, Win8.1 x64 / Win7 x64 host OS's, Ubuntu 14 desktop guest OS's.
If indeed DS-5 detects CMSIS-DAP easily, then your issue may be the same like in DS-5 for Windows. Debugger sometimes seems starting uploading code to target before CMSIS-DAP finishes connecting to target. In such cases it helps to have dedicated Just Connect target, connect to it, reset target from debugger, and then reconnect with right debugger target.
Hope it helps
Edward
Hi Edward,
I am still getting these error messages:
usb 1-2.2: usbfs: USBDEVFS_CONTROL failed cmd vstrm_serverd_r rqt 128 rq 6 len 255 ret -110
Yes, I still have problems detecting the CMSIS-DAP in the DS-5 debugger settings still. DS-5 sometimes detects the CMSIS-DAP hardly at all. Not even 1 in 10 times. More like 1 in 40 times.
I don't have a hardware USB compatibility menu in ubuntu, but there is some information about the USB controller. It says the max speed is 12 MBit/sec, meaning it's USB 1.1 already.
When I plug in the CMSIS-DAP in to the VM, this is what syslog reports:
usb 1-2.2: new full-speed USB device number 8 using uhci_hcd
usb 1-2.2: New USB device found, idVendor=c251, idProduct=f002
usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2.2: Product: OpenSDA CMSIS-DAP
usb 1-2.2: Manufacturer: KEIL - Tools By ARM
usb 1-2.2: SerialNumber: A000000001
hid-generic 0003:C251:F002.0005: hiddev0,hidraw2: USB HID v1.00 Device [KEIL - Tools By ARM OpenSDA CMSIS-DAP] on usb-0000:02:00.0-2.2/input0
Thank you.
Hi Jack
I meant VMware machine setting in Windows for your Ubuntu guest OS. VMware windows menu, do you see it?
But hm, I'm not sure if I tried VMware USB speed trick on both my PCs. I'm sure it worked on my laptop, but it could be that it didn't on desktop, can't remember. I switched to VirtualBox and it almost suits my nees, CMSIS-DAP works under Linux guest OS on both PC's, also TFTP doesn't timeout when operating over WiFi link.
Regards
Edward
It is now working much better. Not sure if it's the effect of unchecking the USB2.0 box in VMware settings or not....
My VMware Player/Workstation software doesn't have that compatibility option. I have Workstation 8. Oh well.
Thanks for your help. I might try VirtualBox.
Edward,
Thanks for the information on USB1.1 vs USB2.0. I am indeed using Ubuntu in a VMware VM on a Windows Host. I will try to switch the USB adapter in the VM to 1.1 and give it a go.
Cheers