Interrupt free / polled V-USB

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
cpldcpu
Rank 2
Rank 2
Posts: 44
Joined: Sun Nov 10, 2013 11:26 am

Interrupt free / polled V-USB

Post by cpldcpu » Sun Mar 02, 2014 2:32 pm

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?

martinay
Posts: 10
Joined: Mon Feb 03, 2014 5:20 pm

Re: Interrupt free / polled V-USB

Post by martinay » Sun Mar 02, 2014 4:44 pm

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)

cpldcpu
Rank 2
Rank 2
Posts: 44
Joined: Sun Nov 10, 2013 11:26 am

Re: Interrupt free / polled V-USB

Post by cpldcpu » Sun Mar 02, 2014 4:48 pm

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.

Post Reply