v-usb only accept 8 bytes per packet?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
nhchmg
Posts: 8
Joined: Mon Sep 28, 2009 3:59 am

v-usb only accept 8 bytes per packet?

Post by nhchmg » Tue Oct 06, 2009 12:19 pm

I want to implements a mass storage device,but the bulk command is 31 bytes,what can I do?
thanks advance.

nhchmg
Posts: 8
Joined: Mon Sep 28, 2009 3:59 am

Re: v-usb only accept 8 bytes per packet?

Post by nhchmg » Thu Oct 08, 2009 6:53 pm

default USB_BUFFSIZE = 11, I set USB_BUFFSIZE = 67,It' working

Saimon

Re: v-usb only accept 8 bytes per packet?

Post by Saimon » Fri Oct 23, 2009 7:14 pm

Config your in and out endpoint to 8 bytes. bulk out endpoint will recive all 31 byte of command, but it take 4 transfer.
For more iformation this is my realization of bulk endpoints
http://depositfiles.com/files/00ar212ls

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

Re: v-usb only accept 8 bytes per packet?

Post by christian » Mon Oct 26, 2009 11:09 pm

The low level USB packets are always maximum 8 bytes for low speed devices. Larger blocks are transferred in chunks of 8 bytes. V-USB handles this more or less transparently, it calls usbFunctionRead() and usbFunctionWrite() for blocks of 8 bytes.

Post Reply