Segger USB gets disconnected all the time

Discussions related to using VirtualBox on Windows hosts.
Post Reply
rkrehbiel
Posts: 4
Joined: 7. Feb 2022, 14:17

Segger USB gets disconnected all the time

Post by rkrehbiel »

I have a Windows 10 host, running VirtualBox 6.1.32, and some Ubuntu 20.04 guests. The guests run various embedded development tools, and most need access to a USB-connected "SEGGER" for in-circuit programming and debugging. So I can use the Devices/USB/blah menu to connect the SEGGER.

But after just a few minutes of use, it will become disconnected. It does this pretty much every time.

The Ubuntu guest OS just says "usb 1-2: USB disconnect, device number 3". In the Windows host, VBox.log says "05:44:12.818486 VUSB: Detached '0000000007129000[proxy 1366:0105]' from port 2 on RootHub#1".

If I use the SEGGER less "strenuously" it can remain connected (like, connect, use the GUI to launch the app, then quit the GUI and leave it alone). So I'm thinking it's exhausting some resource, overflowing an I/O queue, some such. Is there something I can do? Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Segger USB gets disconnected all the time

Post by scottgus1 »

rkrehbiel wrote:I can use the Devices/USB/blah menu to connect the SEGGER.
I don't know if this will help, but you might try a full-blown preset USB filter: USB basics and troubleshooting
AndyCot
Posts: 300
Joined: 29. Feb 2020, 03:04

Re: Segger USB gets disconnected all the time

Post by AndyCot »

Is the "SEGGER" you are using a JTAG programmer? If it is then is it using bit banging and therefore timing is critical or using a proper USB to JTAG type IC's (FTDI JTAG example https://ftdichip.com/software-examples/ ... -examples/ and a bit banging example https://hackaday.com/2013/08/31/learn-j ... rogrammer/ )? Be aware that old and new FTDI chips can also be used for bit banging, but only newer (last 15 years) have JTAG support built in.

If it is bit banging then the VM guest may need more resources such as CPU and RAM to ensure that it does not slow down while doing the bit banging.
rkrehbiel
Posts: 4
Joined: 7. Feb 2022, 14:17

Re: Segger USB gets disconnected all the time

Post by rkrehbiel »

scottgus1 wrote:
rkrehbiel wrote:I can use the Devices/USB/blah menu to connect the SEGGER.
I don't know if this will help, but you might try a full-blown preset USB filter: USB basics and troubleshooting
Thanks. I have added the segger as a preset device. It's nice that it reconnects itself again, but it still disconnects the debugging session when it happens.
rkrehbiel
Posts: 4
Joined: 7. Feb 2022, 14:17

Re: Segger USB gets disconnected all the time

Post by rkrehbiel »

AndyCot wrote:Is the "SEGGER" you are using a JTAG programmer?
It's this: https://www.adafruit.com/product/3571
rkrehbiel
Posts: 4
Joined: 7. Feb 2022, 14:17

Re: Segger USB gets disconnected all the time

Post by rkrehbiel »

rkrehbiel wrote:It's this: https://www.adafruit.com/product/3571
I just remembered (I saw it sitting over there): It also happens with this: https://www.silabs.com/development-tool ... tarter-kit

This development board has an on-board SEGGER j-link device.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Segger USB gets disconnected all the time

Post by fth0 »

Generally speaking, VirtualBox is an application running on the host OS and as such any VirtualBox VM is subject to the scheduling decisions of the host OS. In consequence, there are no timing guarantees on the virtual USB bus provided to the guest OS ...
Post Reply