Few questions about V-USB

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Avarges
Posts: 1
Joined: Fri Jan 29, 2010 6:29 pm

Few questions about V-USB

Post by Avarges » Fri Jan 29, 2010 6:48 pm

Hello.

I want to know is there real speed limit for output and input transfers in V-USB. As i can understand in every usbpool i can send 8bytes (64 bits), in config i see minimal usbpool interval is 10 ms (USB_CFG_INTR_POLL_INTERVAL). Is that mean 6400 bits per second is speed limit?

Second question is:
I try to use (in V-USB based project) timer1 compare A match interrupt also and it interrupts every 555 microseconds, After start it works about 1-2 seconds normal. After: or compare A match int handler don't work or host show me messages like "USB bad device", etc. As i can understand this is V-USB and other interrupt conflicts, is there any way to solve this conflict?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Few questions about V-USB

Post by christian » Sun Feb 28, 2010 6:10 pm

Regarding transfer speed: The poll rate is only relevant for interrupt endpoints. What you compute would be the maximum data rate for an interrupt endpoint when you send a maximum of 8 bytes on each poll.

In practice, people use control endpoints for higher volume data transfer on low speed devices. You can get somewhere close to 7 kB/s with that. See thread viewtopic.php?f=8&t=19

Regarding your timer interrupt question: If you need a fast real-time interrupt, you can't use V-USB on the same chip. V-USB MUST have the highest priority interrupt (which can run for several 100 microseconds) and it MUST be able to interrupt all other interrupts (which means that you have to declare them accordingly so that gcc inserts a sei instruction as the first instruction of the handler).

Post Reply