Page 1 of 1

Interrupt free / polled V-USB

Posted: Sun Mar 02, 2014 2:32 pm
by cpldcpu
I wrote a blog article to explain the interrupt-free V-USB implementation that will be used in the upcoming USB Bootloader Micronucleus V2. The idea of implementing a polled-version of V-USB was brought up in this forum by blarrg.

http://cpldcpu.wordpress.com/2014/03/02 ... ree-v-usb/

I think it is pretty interesting, since the approach of intentionally timing out packets also allows to improve the general performance of V-USB, even when interrupts are used. Any thoughts on that?

Re: Interrupt free / polled V-USB

Posted: Sun Mar 02, 2014 4:44 pm
by martinay
Very good analysis !

The host appetite described in the blog could also probably explains problems I’ve got with CDC-ACM …
( see viewtopic.php?f=8&t=8838 )
I will probably plug a Saleae logic analyser to confirm that)

Re: Interrupt free / polled V-USB

Posted: Sun Mar 02, 2014 4:48 pm
by cpldcpu
Also mirroring my response here :)

Although I am not familiar with your problem, the reason could indeed be similar. I have also observed that things depend on the operating system and usb hub as well.

You can easily emulate the behavior of the interrupt-free V-USB and avoid the NACKing problem by disabling interrupts while calling usbpoll() and waiting for a free bus before enabling them.