Page 1 of 1

Segger USB gets disconnected all the time

Posted: 8. Feb 2022, 20:56
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.

Re: Segger USB gets disconnected all the time

Posted: 8. Feb 2022, 21:18
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

Re: Segger USB gets disconnected all the time

Posted: 9. Feb 2022, 01:31
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.

Re: Segger USB gets disconnected all the time

Posted: 9. Feb 2022, 16:17
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.

Re: Segger USB gets disconnected all the time

Posted: 9. Feb 2022, 16:23
by rkrehbiel
AndyCot wrote:Is the "SEGGER" you are using a JTAG programmer?
It's this: https://www.adafruit.com/product/3571

Re: Segger USB gets disconnected all the time

Posted: 9. Feb 2022, 16:28
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.

Re: Segger USB gets disconnected all the time

Posted: 9. Feb 2022, 18:56
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 ...